mdcms/docs/unreleased.md

1.6 KiB

Unreleased changes

Changes merged into development that have not yet been released to main.


Untranslated content now visible in all categories

Status: On development, pending release.

What was broken

When the category system is enabled, a page or 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 files to disappear from the navigation and from posts-* tag listings — even though no translated version existed. If you wrote English posts without a .en.md suffix, they simply vanished the moment a visitor switched language.

What it does now

Files without a category suffix are treated as uncategorised — meaning they belong to every category, not just the default one. A post called my-post.md now appears in the nav and post lists 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 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.