From 8af07f80710df7e0db41cf78659ecb36eaea8e59 Mon Sep 17 00:00:00 2001 From: Lio Date: Fri, 19 Dec 2025 13:29:52 +0100 Subject: [PATCH] chore: add automation page and improve lists --- astro.config.mjs | 3 +++ src/components/astro/post-list.astro | 4 ++-- src/pages/[lang]/posts/[...slug].astro | 9 +++++--- src/pages/automation.mdx | 32 ++++++++++++++++++++++++++ src/styles/global.css | 27 +++++++++++++++++++++- src/styles/post.css | 15 ------------ src/utils/index.ts | 2 +- 7 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 src/pages/automation.mdx diff --git a/astro.config.mjs b/astro.config.mjs index 72c1bac..ad348a5 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -18,6 +18,9 @@ export default defineConfig({ adapter: bun(), output: "server", prefetch: true, + server: { + allowedHosts: ['callisto', 'callisto.end-fahrenheit.ts.net'] + }, site: "https://lio.cat", markdown: { remarkRehype: {}, diff --git a/src/components/astro/post-list.astro b/src/components/astro/post-list.astro index 9aefb0d..099884c 100644 --- a/src/components/astro/post-list.astro +++ b/src/components/astro/post-list.astro @@ -15,9 +15,9 @@ import { formatDate } from "~/utils" class="my-3 flex flex-col visited:text-purple-500/90 md:my-2 md:flex-row" >

- +

{post.data.title}

diff --git a/src/pages/[lang]/posts/[...slug].astro b/src/pages/[lang]/posts/[...slug].astro index 82d50d1..dfdf6ec 100644 --- a/src/pages/[lang]/posts/[...slug].astro +++ b/src/pages/[lang]/posts/[...slug].astro @@ -33,8 +33,11 @@ const { Content } = await render(post)
-

{post.data.title}

-
+

{post.data.title}

+

+ {post.data.description} +

+
{formatDate(post.data.pubDate, "locale", lang)}
@@ -47,7 +50,7 @@ const { Content } = await render(post) { post.data.tags.map((tag: string) => ( -

#{tag}

+

#{tag}

)) } diff --git a/src/pages/automation.mdx b/src/pages/automation.mdx new file mode 100644 index 0000000..6159496 --- /dev/null +++ b/src/pages/automation.mdx @@ -0,0 +1,32 @@ +--- +layout: ../layouts/main.astro +title: Automations +description: Details about my Automations +--- + +# Automations + +Welcome! + +You're likely here because you followed a custom User-Agent from my various Automations/Projects. + +
+Here's a list of User-Agents I currently use when requesting content: + +- `fangmarks/stasher (lio.to/stasher)` +- `fangmarks/stasher (lio.to)` (deprecated) +- `killswitch/v{version} (yiff.click)` +- `yiff/v{version} (wrwlf.de/yiff)` + +
+ +Requests may originate from the following Domains (and/or their Subdomains): +- `lio.to` +- `lio.cat` +- `lio.systems` +- `lio.gallery` +- `lio.domains` +- `himbo.cat` + +
+Detailed Deployment Domains/IPs may be provided [upon request](mailto:automations@lio.cat) \ No newline at end of file diff --git a/src/styles/global.css b/src/styles/global.css index f1f8d35..6fc41a7 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -9,6 +9,30 @@ body { font-family: "JetBrains Mono Variable", monospace; } + +@layer base { h1 { font-size: var(--text-2xl); } h2 { font-size: var(--text-xl); }} + +code { + border-radius: 0.25rem; + background-color: rgba(249, 115, 22, 0.5); + padding-left: 0.25rem; + padding-right: 0.25rem; +} + +.dark code { + background-color: rgba(249, 115, 22, 0.8); +} + +code::before, +code::after { + content: none !important; +} + +ol, ul { + list-style-type: "- "; +} + + .nav-links, .markdown-link { text-decoration: none; @@ -27,6 +51,7 @@ body { display: inline-block; } -a:hover { +.nav-links:hover, .markdown-link:hover { text-decoration: underline; } + diff --git a/src/styles/post.css b/src/styles/post.css index 3b7a7d8..e69de29 100644 --- a/src/styles/post.css +++ b/src/styles/post.css @@ -1,15 +0,0 @@ -article code { - border-radius: 0.25rem; - background-color: rgba(249, 115, 22, 0.5); - padding-left: 0.25rem; - padding-right: 0.25rem; -} - -.dark article code { - background-color: rgba(249, 115, 22, 0.8); -} - -article code::before, -article code::after { - content: none !important; -} diff --git a/src/utils/index.ts b/src/utils/index.ts index 60bc073..d83a509 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -38,7 +38,7 @@ export const getPostsByLocale = async (locale: string) => { posts.forEach((post: any) => { post.data.lang = locale }) - const filtered = posts.filter((p) => p.data.published) + const filtered = import.meta.env.MODE === 'development'? posts : posts.filter((p) => p.data.published) return filtered.sort( (a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), )