Pages without a category suffix still map to the default category. Only posts/ files without a suffix get uncategorized: true in nav.yml and category: null in search.json. https://claude.ai/code/session_01EzU13EL8D5Ud2ngQUKDj9e
1.7 KiB
Unreleased changes
Changes merged into development that have not yet been released to main.
Untranslated posts now visible in all categories
Status: On development, pending release.
What was broken
When the category system is enabled, a post file without a category suffix (e.g. posts/my-post.md) was silently assigned to the default category only. Switching to any other category caused those posts to disappear from the nav and from posts-* tag listings — even though no translated version existed. If you wrote posts without a language suffix, they simply vanished the moment a visitor switched category.
Pages without a category suffix are unaffected: they continue to be assigned to the default category, which is the correct behaviour for pages.
What it does now
Posts without a category suffix are treated as uncategorised — meaning they appear in every category. A post called my-post.md now shows up regardless of which category is active. A post called my-post.en.md still appears only in the en category as before.
Mixed situations work as expected: if you have both my-post.md and my-post.nb.md, the Norwegian variant is shown when the nb category is active, and the bare my-post.md is shown for every other category.
What changes in the build output
After rebuilding a site with mdcms build, affected post entries in nav.yml gain an uncategorized: true field:
- file: posts/my-post.md
title: My Post
sort: 100
uncategorized: true
In search.json, these entries carry "category": null instead of the default category code. This is what tells the renderer to include them universally.
A rebuild is required for existing sites to pick up the change.