Compare commits

..

1 Commits

Author SHA1 Message Date
4dbaf2f44a chore(deps): update dependency @directus/sdk to v21.2.0
All checks were successful
renovate/stability-days Updates have met minimum release age requirement
test-build / guarddog (pull_request) Successful in 24s
test-build / build (pull_request) Successful in 5m16s
2026-03-05 23:01:55 +00:00
8 changed files with 25 additions and 25 deletions

View File

@@ -42,14 +42,14 @@ jobs:
uses: actions/checkout@v6
- name: Login to Registry
uses: docker/login-action@v4
uses: docker/login-action@v3
with:
registry: ${{ vars.REPOSITORY_HOST }}
username: ${{ gitea.actor }}
password: ${{ secrets.REPOSITORY_TOKEN }}
- name: Login to Docker
uses: docker/login-action@v4
uses: docker/login-action@v3
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
@@ -62,7 +62,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4
uses: docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
@@ -77,7 +77,7 @@ jobs:
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v6
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
@@ -101,7 +101,7 @@ jobs:
fi
- name: Build and Push Image
uses: docker/build-push-action@v7
uses: docker/build-push-action@v6
with:
context: .
push: true

View File

@@ -42,14 +42,14 @@ jobs:
uses: actions/checkout@v6
- name: Login to Registry
uses: docker/login-action@v4
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ vars.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_SECRET }}
- name: Login to Docker
uses: docker/login-action@v4
uses: docker/login-action@v3
with:
registry: ${{ vars.DH_REGISTRY }}
username: ${{ secrets.DH_USERNAME }}
@@ -62,7 +62,7 @@ jobs:
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v4
uses: docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
@@ -77,7 +77,7 @@ jobs:
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v6
uses: docker/metadata-action@v5
with:
tags: |
type=ref,event=branch
@@ -101,7 +101,7 @@ jobs:
fi
- name: Build and Push Image
uses: docker/build-push-action@v7
uses: docker/build-push-action@v6
with:
context: .
push: true

View File

@@ -22,7 +22,7 @@ WORKDIR /app
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
LABEL version="2.20.0"
LABEL version="2.19.0"
LABEL description="Astro based personal website"
ENV HOST=0.0.0.0

View File

@@ -1,7 +1,7 @@
{
"name": "site-profile",
"type": "module",
"version": "2.20.0",
"version": "2.19.0",
"homepage": "https://www.alexlebens.dev",
"bugs": {
"url": "https://gitea.alexlebens.dev/alexlebens/site-profile/issues",

View File

@@ -10,7 +10,7 @@ import { timeago } from '@support/time';
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*', 'category.slug'],
fields: ['*'],
sort: ['-published_date'],
})
);
@@ -31,16 +31,13 @@ const layoutPattern = [
const postMap: Map<string, Post[]> = posts
.sort((a: Post, b: Post) => b.published_date.valueOf() - a.published_date.valueOf())
.reduce((acc, obj) => {
const categorySlug = obj.category?.slug;
if (!categorySlug) return acc;
let posts = acc.get(categorySlug);
let posts = acc.get(obj.category);
if (!posts) {
posts = [];
}
posts.push(obj);
acc.set(categorySlug, posts);
acc.set(obj.category, posts);
return acc;
}, new Map<string, Post[]>());

View File

@@ -37,7 +37,7 @@ export type Post = {
title: string;
description: string;
tags: string[];
category: Category;
category: string;
selected: boolean;
published: boolean;
content: string;

View File

@@ -17,9 +17,7 @@ import { getDirectusImageURL } from '@/support/url';
const post = Astro.props;
export async function getStaticPaths() {
const posts = await directus.request(readItems('posts', {
fields: ['*', 'category.*'],
}));
const posts = await directus.request(readItems('posts'));
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
@@ -27,7 +25,12 @@ export async function getStaticPaths() {
}
const global = await directus.request(readSingleton('site_global'));
const category = post.category;
const [category] = post.category ? await directus.request(
readItems('categories', {
filter: { slug: { _eq: post.category },},
limit: 1,
}))
: [];
const readingTime = getReadingTime(post.content || '');

View File

@@ -22,7 +22,7 @@ const global = await directus.request(readSingleton('site_global'));
const posts = await directus.request(
readItems('posts', {
filter: { published: { _eq: true } },
fields: ['*', 'category.slug'],
fields: ['*'],
sort: ['-published_date'],
})
);
@@ -30,7 +30,7 @@ const posts = await directus.request(
const categoriesPosts = posts
.sort((a: Post, b: Post) => b.published_date.valueOf() - a.published_date.valueOf())
.filter((b) => {
return b.category?.slug === category.slug;
return b.category === category.slug;
});
---