Skip to content

fix(tags): write tag pages into tags/ even next to a Tags.md page - #232

Merged
capjan merged 1 commit into
mainfrom
fix/tag-folder-casing
Nov 10, 2026
Merged

capjan merged 1 commit into
mainfrom
fix/tag-folder-casing

Conversation

@capjan

@capjan capjan commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Problem

mdu check-site on the rendered Docs reported 17 errors such as Tags.html: tags/migration.html: local target does not exist with this casing.

The checker was right. On a case-insensitive file system (macOS APFS, Windows), the vocabulary page Tags.md gets the alias redirect Tags/index.html, and writing it creates the output folder as Tags/. The tag pages written afterwards then landed in that folder, while every link points to tags/…. On a case-sensitive web server those links would return 404. Sites built on Linux (like the published one) were not affected, because there Tags/ and tags/ are separate folders.

Fix

WriteTagPages now creates the tag folder with exactly the name tags. If a folder with different casing already exists, which happens on case-insensitive disks or with leftovers from an earlier render, it is renamed through a temporary name.

Checks

  • New test TagFolderKeepsItsCasingNextToTheVocabularyPageTags: renders a site with Tags.md and a leftover Tags/ folder, then expects tags/ and a clean check-site. It fails without the fix.
  • Rendered Docs on macOS: output folder is tags/, and mdu check-site site reports 0 errors on 124 pages.
  • mdu lint (MDU003) does not have the problem: Rule3Validator looks up folder segments only among directories and the last segment only among files. It also checks source files, and Docs has no tags/ source folder.
  • dotnet test Mdu.sln passes.

On a case-insensitive file system the redirect Tags/index.html of a
vocabulary page Tags.md created the output folder as Tags/, so the tag
pages landed in Tags/ while all links point to tags/. mdu check-site
reported these links, and a case-sensitive web server would answer 404.
The tag folder now gets exactly the name tags, renaming a folder that
differs only in case.
@capjan
capjan merged commit 323ca39 into main Nov 10, 2026
7 checks passed
@capjan
capjan deleted the fix/tag-folder-casing branch November 10, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant