From be0ffaeb9370bf59b2ea9b91e41e90bc7d351d2b Mon Sep 17 00:00:00 2001 From: haetae Date: Tue, 2 Sep 2025 17:08:20 -0400 Subject: [PATCH] fix some stuff with fics loader --- public/.well-known/atproto-did | 1 + src/content/fics/phai/_test.yaml | 9 - src/content/fics/phai/chap.md | 11 - src/content/fics/test/_index.toml | 9 - src/content/fics/test/test.md | 10 - src/content/fics/test/two.md | 13 - .../fics/weight of living/moving on.md | 2 - src/layouts/Blog.astro | 479 +++--------------- src/pages/blog/[...id].astro | 109 +--- src/pages/blog/index.astro | 1 - src/pages/fics/[ficId]/index.astro | 7 +- src/pages/index.astro | 229 ++++++--- src/utils/loader.ts | 5 +- 13 files changed, 240 insertions(+), 645 deletions(-) create mode 100644 public/.well-known/atproto-did delete mode 100644 src/content/fics/phai/_test.yaml delete mode 100644 src/content/fics/phai/chap.md delete mode 100644 src/content/fics/test/_index.toml delete mode 100644 src/content/fics/test/test.md delete mode 100644 src/content/fics/test/two.md diff --git a/public/.well-known/atproto-did b/public/.well-known/atproto-did new file mode 100644 index 0000000..20fe09b --- /dev/null +++ b/public/.well-known/atproto-did @@ -0,0 +1 @@ +did:plc:dg2qmmjic7mmecrbvpuhtvh6 \ No newline at end of file diff --git a/src/content/fics/phai/_test.yaml b/src/content/fics/phai/_test.yaml deleted file mode 100644 index 144387b..0000000 --- a/src/content/fics/phai/_test.yaml +++ /dev/null @@ -1,9 +0,0 @@ -title: truly -series: honkai -publishedAt: 2021-05-20 -summary: - this is crazy but... - - but would you - - > trust me? \ No newline at end of file diff --git a/src/content/fics/phai/chap.md b/src/content/fics/phai/chap.md deleted file mode 100644 index ada4b98..0000000 --- a/src/content/fics/phai/chap.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: take me on -publishedAt: 2025-01-05 -notes: hahah ---- - -dksafjasldkjfksdl -kjfdlskafjaslk -k - -ss sddd \ No newline at end of file diff --git a/src/content/fics/test/_index.toml b/src/content/fics/test/_index.toml deleted file mode 100644 index 1faaed8..0000000 --- a/src/content/fics/test/_index.toml +++ /dev/null @@ -1,9 +0,0 @@ -title = "this is a test" -series = [ - "test", - "fandom 2" -] -publishedAt = 2022-12-22 -summary = """ - yeller - """ \ No newline at end of file diff --git a/src/content/fics/test/test.md b/src/content/fics/test/test.md deleted file mode 100644 index 0c46005..0000000 --- a/src/content/fics/test/test.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: ch 1 -publishedAt: 2022-11-01 -notes: i wrote this in a fugue state while listening to [Waste by Oh Wonder](https://www.youtube.com/watch?v=Ar1grAdGkec) -sortOrder: 1 ---- - -test - -two \ No newline at end of file diff --git a/src/content/fics/test/two.md b/src/content/fics/test/two.md deleted file mode 100644 index 4508008..0000000 --- a/src/content/fics/test/two.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: chapter 2 -publishedAt: 2023-12-12 -notes: i wrote this in a fugue state while listening to [Waste by Oh Wonder](https://www.youtube.com/watch?v=Ar1grAdGkec) -sortOrder: 2 ---- - -tksdfalkjflkd -kasdjfldk -k - - -kdsafsd diff --git a/src/content/fics/weight of living/moving on.md b/src/content/fics/weight of living/moving on.md index 60bcebe..81c8b1d 100644 --- a/src/content/fics/weight of living/moving on.md +++ b/src/content/fics/weight of living/moving on.md @@ -4,8 +4,6 @@ publishedAt: 2020-12-20T19:18:00 notes: i wrote this in a fugue state while listening to [Waste by Oh Wonder](https://www.youtube.com/watch?v=Ar1grAdGkec) --- -![the of all time]($/images/the-of-all-time.png) -     diff --git a/src/layouts/Blog.astro b/src/layouts/Blog.astro index 0a6628a..8882230 100644 --- a/src/layouts/Blog.astro +++ b/src/layouts/Blog.astro @@ -6,10 +6,6 @@ import Navbar from "~/Navbar.astro"; import formatDate from "@/utils/formatDate"; import moods from "@/utils/moods"; -import outerBBS from "$/guild-bbs.png"; -import innerBBS from "$/guild-bbs-content.png"; -import sideBBS from "$/guild-bbs-list.png"; - interface Props { id?: string; title: string; @@ -31,435 +27,96 @@ blog.sort((a, b) => b.data.pubDate!.valueOf() - a.data.pubDate!.valueOf()); --- - - - - - - - -
+
+
+

{title}

+
+ +
+
+ +
+ +
+ + {currently && ( + + )} +
+ + + - -
-
-
-

{title}

-
-
- -
-
- -
- -
- - {currently && ( - - )} -
-
-
- \ No newline at end of file diff --git a/src/pages/blog/[...id].astro b/src/pages/blog/[...id].astro index 81ea227..9cd5d81 100644 --- a/src/pages/blog/[...id].astro +++ b/src/pages/blog/[...id].astro @@ -2,7 +2,6 @@ import Blog from '@/layouts/Blog.astro'; import type { GetStaticPaths } from 'astro'; import { getCollection, render } from 'astro:content'; -import buttons from "$/guild-bbs-buttons.png"; export const getStaticPaths = (async () => { const blog = await getCollection("blog"); @@ -24,7 +23,6 @@ const next = current === 0 ? undefined : blog[current - 1]; - @@ -33,116 +31,15 @@ const next = current === 0 ? undefined : blog[current - 1]; )} - - - \ No newline at end of file + \ No newline at end of file diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index 46b86ac..29dbe75 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -1,6 +1,5 @@ --- import Layout from "@/layouts/Layout.astro"; -import Figure from "~/Figure.astro"; import formatDate from "@/utils/formatDate"; import { getCollection } from "astro:content"; import dayjs from "dayjs"; diff --git a/src/pages/fics/[ficId]/index.astro b/src/pages/fics/[ficId]/index.astro index 3bf189a..9104de8 100644 --- a/src/pages/fics/[ficId]/index.astro +++ b/src/pages/fics/[ficId]/index.astro @@ -59,14 +59,14 @@ const notes = fic.rendered && await parser.parse((fic.rendered.metadata!.frontma - {fic.data.chapters && ( + {chapters && (

chapters

    {chapters.map(chapter => ( @@ -75,7 +75,6 @@ const notes = fic.rendered && await parser.parse((fic.rendered.metadata!.frontma
)} - {fic.body && (
diff --git a/src/pages/index.astro b/src/pages/index.astro index f68dabb..b5e8210 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,21 +1,24 @@ --- +import { Font } from 'astro:assets'; import Layout from '@/layouts/Layout.astro'; import Navbar from '~/Navbar.astro'; -import bulletin from "$/acnl-bulletin.png"; +import outerBBS from "$/guild-bbs.png"; +import innerBBS from "$/guild-bbs-content.png"; +import sideBBS from "$/guild-bbs-list.png"; +import buttons from "$/guild-bbs-buttons.png"; --- + + + + + + + +
-
-
-

welcome!

-
- this is -
-
-
-

update title

@@ -24,6 +27,26 @@ import bulletin from "$/acnl-bulletin.png";

some stuff happened

+ + +
+ +
+
+

welcome!

+
+ this is +
+
@@ -36,76 +59,146 @@ import bulletin from "$/acnl-bulletin.png";
- \ No newline at end of file diff --git a/src/utils/loader.ts b/src/utils/loader.ts index 9f0af1f..d0ce725 100644 --- a/src/utils/loader.ts +++ b/src/utils/loader.ts @@ -81,7 +81,10 @@ async function getAllChapters(metaPath: string) { const ficFolder = fic.split("/").at(-1); const entries = await Array.fromAsync(glob(fic + '/*.md')); const chapters = entries.map(chapter => path.relative(fic, chapter)); - return chapters.map(chapter => `${ficFolder}/${chapter}`); + return chapters.map(chapter => { + const chapterWithoutExt = path.parse(chapter).name; // needed for loader to properly grab ids + return `${ficFolder}/${chapterWithoutExt}`; + }); } // unused for now