Skip to content

Fix mkdocs build: move blogging locale/time_format under the plugin#15

Merged
ndfivegn merged 1 commit into
aucloud:mainfrom
ndfivegn:fix/mkdocs-blogging-locale
Jul 3, 2026
Merged

Fix mkdocs build: move blogging locale/time_format under the plugin#15
ndfivegn merged 1 commit into
aucloud:mainfrom
ndfivegn:fix/mkdocs-blogging-locale

Conversation

@ndfivegn

@ndfivegn ndfivegn commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Build the website workflow fails at make docs-validate (mkdocs build -c -s):

babel.core.UnknownLocaleError: unknown locale 'c'
  mkdocs_blogging_plugin/util.py get_localized_date -> babel format_datetime(locale=_locale)

The mkdocs-blogging-plugin had no locale set, so it fell back to the CI runner's LC_TIME=C. Newer babel rejects the C locale (older versions silently treated it as English), which is why a previously-green build started failing.

Root cause

locale, time_format and meta_time_format were nested under theme:, where mkdocs-material ignores them — so they never reached the blogging plugin.

Fix

Move the three keys under the - blogging: plugin so locale: en actually applies (also makes the intended time_format take effect). No rendered-content change beyond the (previously non-functional) date format.

🤖 Generated with Claude Code

The blogging plugin's `locale`, `time_format` and `meta_time_format` keys were
nested under `theme:`, where mkdocs-material ignores them. The blogging plugin
therefore fell back to the runner's `LC_TIME=C`; newer babel rejects that with
`UnknownLocaleError: 'c'`, breaking `mkdocs build -c -s` (make docs-validate).

Move the three keys under `- blogging:` so `locale: en` actually applies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eaV2mYYQztC3xJtxWpRQN
@ndfivegn ndfivegn merged commit 78d3610 into aucloud:main Jul 3, 2026
2 of 3 checks passed
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