diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/BaseHead.astro | 2 | ||||
| -rw-r--r-- | src/components/note/Note.astro | 2 | ||||
| -rw-r--r-- | src/pages/index.astro | 14 | ||||
| -rw-r--r-- | src/pages/micro/[...page].astro (renamed from src/pages/notes/[...page].astro) | 12 | ||||
| -rw-r--r-- | src/pages/micro/[...slug].astro (renamed from src/pages/notes/[...slug].astro) | 0 | ||||
| -rw-r--r-- | src/pages/micro/rss.xml.ts (renamed from src/pages/notes/rss.xml.ts) | 6 | ||||
| -rw-r--r-- | src/site.config.ts | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 7ff861f..ceb55ea 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -71,7 +71,7 @@ const socialImageURL = new URL(ogImage ? ogImage : "/social-card.png", Astro.url {/* RSS auto-discovery */} <link href="/rss.xml" title="Blog" rel="alternate" type="application/rss+xml" /> -<link href="/notes/rss.xml" title="Notes" rel="alternate" type="application/rss+xml" /> +<link href="/micro/rss.xml" title="Micro" rel="alternate" type="application/rss+xml" /> {/* Webmentions */} { diff --git a/src/components/note/Note.astro b/src/components/note/Note.astro index cff3414..d96cb6d 100644 --- a/src/components/note/Note.astro +++ b/src/components/note/Note.astro @@ -21,7 +21,7 @@ const { Content } = await render(note); <Tag class="title" class:list={{ "text-base": isPreview }}> { isPreview ? ( - <a class="cactus-link" href={`/notes/${note.id}/`}> + <a class="cactus-link" href={`/micro/${note.id}/`}> {note.data.title} </a> ) : ( diff --git a/src/pages/index.astro b/src/pages/index.astro index a539717..4b813da 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -14,10 +14,10 @@ const allPostsByDate = allPosts .sort(collectionDateSort) .slice(0, MAX_POSTS) as CollectionEntry<"post">[]; -// Notes -const MAX_NOTES = 5; -const allNotes = await getCollection("note"); -const latestNotes = allNotes.sort(collectionDateSort).slice(0, MAX_NOTES); +// Micro +const MAX_MICRO = 5; +const allMicro = await getCollection("note"); +const latestMicro = allMicro.sort(collectionDateSort).slice(0, MAX_MICRO); --- <PageLayout meta={{ title: "Home" }}> @@ -46,13 +46,13 @@ const latestNotes = allNotes.sort(collectionDateSort).slice(0, MAX_NOTES); </ul> </section> { - latestNotes.length > 0 && ( + latestMicro.length > 0 && ( <section class="mt-16"> <h2 class="title text-accent mb-6 text-xl"> - <a href="/notes/">Notes</a> + <a href="/micro/">Micro</a> </h2> <ul class="space-y-6" role="list"> - {latestNotes.map((note) => ( + {latestMicro.map((note) => ( <li> <Note note={note} as="h3" isPreview /> </li> diff --git a/src/pages/notes/[...page].astro b/src/pages/micro/[...page].astro index fdc5af9..08f5fd3 100644 --- a/src/pages/notes/[...page].astro +++ b/src/pages/micro/[...page].astro @@ -8,9 +8,9 @@ import type { GetStaticPaths, Page } from "astro"; import { Icon } from "astro-icon/components"; export const getStaticPaths = (async ({ paginate }) => { - const MAX_NOTES_PER_PAGE = 10; - const allNotes = await getCollection("note"); - return paginate(allNotes.sort(collectionDateSort), { pageSize: MAX_NOTES_PER_PAGE }); + const MAX_MICRO_PER_PAGE = 10; + const allMicro = await getCollection("note"); + return paginate(allMicro.sort(collectionDateSort), { pageSize: MAX_MICRO_PER_PAGE }); }) satisfies GetStaticPaths; interface Props { @@ -21,8 +21,8 @@ interface Props { const { page } = Astro.props; const meta = { - description: "Read my collection of notes", - title: "Notes", + description: "Read my collection of micro posts", + title: "Micro", }; const paginationProps = { @@ -44,7 +44,7 @@ const paginationProps = { <PageLayout meta={meta}> <section> <h1 class="title mb-6 flex items-center gap-3"> - Notes <a class="text-accent" href="/notes/rss.xml" target="_blank"> + Micro <a class="text-accent" href="/micro/rss.xml" target="_blank"> <span class="sr-only">RSS feed</span> <Icon aria-hidden="true" class="h-6 w-6" focusable="false" name="mdi:rss" /> </a> diff --git a/src/pages/notes/[...slug].astro b/src/pages/micro/[...slug].astro index 2ce847d..2ce847d 100644 --- a/src/pages/notes/[...slug].astro +++ b/src/pages/micro/[...slug].astro diff --git a/src/pages/notes/rss.xml.ts b/src/pages/micro/rss.xml.ts index 0f1f945..7311319 100644 --- a/src/pages/notes/rss.xml.ts +++ b/src/pages/micro/rss.xml.ts @@ -3,16 +3,16 @@ import { siteConfig } from "@/site.config"; import rss from "@astrojs/rss"; export const GET = async () => { - const notes = await getCollection("note"); + const micro = await getCollection("note"); return rss({ title: siteConfig.title, description: siteConfig.description, site: import.meta.env.SITE, - items: notes.map((note) => ({ + items: micro.map((note) => ({ title: note.data.title, pubDate: note.data.publishDate, - link: `notes/${note.id}/`, + link: `micro/${note.id}/`, })), }); }; diff --git a/src/site.config.ts b/src/site.config.ts index f4f7539..5abb1ae 100644 --- a/src/site.config.ts +++ b/src/site.config.ts @@ -45,8 +45,8 @@ export const menuLinks: { path: string; title: string }[] = [ title: "Blog", }, { - path: "/notes/", - title: "Notes", + path: "/micro/", + title: "Micro", }, ]; |
