summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/index.astro14
-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
4 files changed, 16 insertions, 16 deletions
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}/`,
})),
});
};