blog: accessors and routes for the folder model
lib/blog.js now reads content/blog/<slug>/ (meta.md + fr.md/en.md): listing shows the requested language with fallback to the first available one, getBlogPost(slug, lang) reports untranslated posts via an untranslated field, and the draft/share accessors keep parsing <slug>-<token> from meta.md. Draft filtering stays keyed on the shared draftsVisible() rule, now exported from lib/content. /blog/[slug] renders the default language with an FR/EN switch when a post exists in both; a new /blog/[slug]/[lang] route serves the other language (static params only mint languages with content). A missing language renders an honest banner linking to the one that exists. yarn post scaffolds the folder shape. Flat collections are untouched.
Showing
app/blog/[slug]/[lang]/page.js
0 → 100644
app/blog/language-nav.js
0 → 100644
Please
register
or
sign in
to comment