From 85c9b072ce110aa36bc23449bf1dc989b54fd410 Mon Sep 17 00:00:00 2001 From: Lio Date: Wed, 19 Nov 2025 00:24:33 +0100 Subject: [PATCH] run linter and adjust config --- .woodpecker/build.yml | 11 --------- Dockerfile | 1 + astro.config.mjs | 2 +- src/components/astro/header.astro | 2 +- src/components/astro/nav.astro | 6 ++--- src/components/astro/recent-blogs.astro | 22 ++++++++--------- src/config/index.ts | 4 +-- src/content.config.ts | 4 +-- src/layouts/base.astro | 33 +++++++------------------ src/layouts/main.astro | 24 +++++++++--------- src/pages/[lang]/posts/[...slug].astro | 5 ++-- src/pages/[lang]/posts/[slug]/og.png.ts | 7 +++--- src/styles/tailwind.css | 32 +++++++++++++----------- src/utils/index.ts | 17 +++++++------ src/utils/plugins/components.ts | 1 - 15 files changed, 72 insertions(+), 99 deletions(-) delete mode 100644 .woodpecker/build.yml diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml deleted file mode 100644 index d1490d3..0000000 --- a/.woodpecker/build.yml +++ /dev/null @@ -1,11 +0,0 @@ -steps: - - name: Build and Push Image - when: - - event: push - branch: main - image: woodpeckerci/plugin-docker-buildx - settings: - repo: registry.lio.systems/wrath - registry: registry.lio.systems - dockerfile: Dockerfile - tag: dev \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index bed9dca..d9917d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,5 @@ FROM base AS release COPY --from=install /temp/prod/node_modules node_modules COPY --from=build /usr/src/app/dist . +EXPOSE 4321 ENTRYPOINT [ "bun", "run", "./server/entry.mjs" ] diff --git a/astro.config.mjs b/astro.config.mjs index c3eab0c..0dc9f2f 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -19,7 +19,7 @@ import node from "@astrojs/node"; export default defineConfig({ output: "static", prefetch: true, - site: import.meta.env.PROD ? "https://lio.cat" : 'http://localhost:4321', + site: import.meta.env.PROD === 'true' ? "https://lio.cat" : 'http://localhost:4321', markdown: { remarkRehype: {}, diff --git a/src/components/astro/header.astro b/src/components/astro/header.astro index 418b261..070608f 100644 --- a/src/components/astro/header.astro +++ b/src/components/astro/header.astro @@ -10,7 +10,7 @@ const config = lang === "de" ? de : en ---
-
+ -
+
{ custom?.map((tab) => ( - + { links && ( p.data.published) +const posts = allPosts + .slice(0, common.latestPosts) + .filter((p) => p.data.published) --- -
{(posts.length > 0) && t("blog.latest")}
-{ (posts.length > 0) && - posts.map((post: any) => ( - - )) +
+ {posts.length > 0 && t("blog.latest")} +
+{ + posts.length > 0 && + posts.map((post: any) => ( + + )) } diff --git a/src/config/index.ts b/src/config/index.ts index 065832f..84c8682 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -7,8 +7,7 @@ export const common = { url: "https://lio.cat", }, googleAnalyticsId: "", - social: [ - ], + social: [], rss: true, navigation: { home: true, @@ -95,7 +94,6 @@ export const en = { }, navigation: { ...common.navigation, - }, pageMeta: { archive: { diff --git a/src/content.config.ts b/src/content.config.ts index 0599263..e0b93e8 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -9,7 +9,7 @@ const postSchema = z.object({ slug: z.string().optional(), tags: z.array(z.string()).optional(), published: z.boolean().optional().default(false), - lang: z.string().optional() + lang: z.string().optional(), }) const enPostsCollection = defineCollection({ @@ -19,7 +19,7 @@ const enPostsCollection = defineCollection({ const dePostsCollection = defineCollection({ loader: glob({ pattern: "**/*.{md,mdx}", base: "src/content/posts/de" }), - schema: postSchema + schema: postSchema, }) export const collections = { diff --git a/src/layouts/base.astro b/src/layouts/base.astro index 653bce6..3a73464 100644 --- a/src/layouts/base.astro +++ b/src/layouts/base.astro @@ -19,14 +19,14 @@ const urls = { const isPost = Astro.url.pathname.includes("posts") -const ogImageURL = new URL(isPost ? urls.postURL : urls.general, Astro.site).href +const ogImageURL = new URL(isPost ? urls.postURL : urls.general, Astro.site) + .href const permalink = new URL(Astro.url.pathname, Astro.site).href const config = lang === "de" ? de : en const title = isPost - ? `${post.title} - ${config.meta.title}` - : `${config.meta.description} - ${config.meta.title}` + ? `${post.title} - ${config.meta.title}` + : `${config.meta.description} - ${config.meta.title}` const description = isPost ? post.description : config.meta.description - --- @@ -39,35 +39,20 @@ const description = isPost ? post.description : config.meta.description {title} - + - - + + - - + +