Skip to content

Commit 2c9ca28

Browse files
committed
blog: move markdown sibling out from under HTML page
`pageExtensions: ["ts", "tsx", "md", "mdx"]` plus a directory named `index.md/` made Next.js treat the markdown route as the index page of `[slug]/`, so `/blog/<slug>` was serving the markdown body instead of the rendered post. Rename the directory to `raw.md/` so the segment is a literal child path (same shape as `feed.xml`) with no `index.<ext>` collision. URL becomes `/blog/<slug>/raw.md`. llms.txt updated to match.
1 parent 25bdf3e commit 2c9ca28

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

app/llms.txt/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function GET() {
1515
"",
1616
...posts.map(
1717
(post) =>
18-
`- [${post.title}](${absoluteUrl(`/blog/${post.slug}/index.md`)}): ${post.description}`,
18+
`- [${post.title}](${absoluteUrl(`/blog/${post.slug}/raw.md`)}): ${post.description}`,
1919
),
2020
"",
2121
];

0 commit comments

Comments
 (0)