feat: move posts to /posts/[slug]

This commit is contained in:
Lewis Wynne 2026-01-23 03:08:34 +00:00
parent fb57494c37
commit f04b56a2f1
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@ function extractDomain(url: string): string {
'lewis m.w. <a href="mailto:lewis@wynne.rs">mail</a> <a href="https://github.com/llywelwyn">gh</a>', 'lewis m.w. <a href="mailto:lewis@wynne.rs">mail</a> <a href="https://github.com/llywelwyn">gh</a>',
'', '',
'blog', 'blog',
...sorted.map(post => `<span class="muted">${formatDate(post.data.date)}</span> <a href="/${post.id}">${post.data.title}</a>`), ...sorted.map(post => `<span class="muted">${formatDate(post.data.date)}</span> <a href="/posts/${post.id}">${post.data.title}</a>`),
'', '',
'txt', 'txt',
...txtFiles.map(f => `<span class="muted">${formatDate(f.mtime)}</span> <a href="/txt/${f.name}">${f.name}</a>`), ...txtFiles.map(f => `<span class="muted">${formatDate(f.mtime)}</span> <a href="/txt/${f.name}">${f.name}</a>`),

View file

@ -1,6 +1,6 @@
--- ---
import { getCollection, render } from 'astro:content'; import { getCollection, render } from 'astro:content';
import '../styles/global.css'; import '../../styles/global.css';
export async function getStaticPaths() { export async function getStaticPaths() {
const posts = await getCollection('posts'); const posts = await getCollection('posts');