Skip to content

Commit 3fabcaf

Browse files
committed
Handle Click default values correctly
1 parent 18e69c1 commit 3fabcaf

1 file changed

Lines changed: 167 additions & 0 deletions

File tree

PLAN.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# MkDocs-NG Feature Plan
2+
3+
Curated from [mkdocs/mkdocs issues](https://github.com/mkdocs/mkdocs/issues) and
4+
[discussions](https://github.com/mkdocs/mkdocs/discussions), sorted by user demand
5+
(reactions :+1: + comments). Items already addressed by mkdocs-ng are excluded.
6+
7+
---
8+
9+
## 🔥 P0 – High Demand / Urgent Bugs
10+
11+
### 1. Remove CDNs from built-in themes
12+
- **Issue**: [mkdocs/mkdocs#2171](https://github.com/mkdocs/mkdocs/issues/2171)
13+
- **👍**: 18 · 💬: 7
14+
- **Description**: The built-in `mkdocs` and `readthedocs` themes load fonts (e.g. Lato, Roboto Slab) and CSS from Google Fonts / CDNs. Users who self-host documentation want full offline / privacy-respecting operation without third-party requests. Some fonts are already bundled, but `base.html` still references external URLs.
15+
- **Labels**: `Theme-mkdocs`, `Theme-readthedocs`
16+
17+
### 2. Improve `mkdocs serve` performance & authoring experience
18+
- **Issue**: [mkdocs/mkdocs#3695](https://github.com/mkdocs/mkdocs/issues/3695)
19+
- **👍**: 15 · 💬: 22
20+
- **Description**: Opened by the maintainer of Material for MkDocs. Proposes collaborative improvements to `mkdocs serve`: faster rebuilds, smarter watcher, better error messages, and lowering the friction of the write-build-check loop. Concrete ideas include incremental builds, file-system-level caching, and a plugin-friendly architecture for serve hooks.
21+
22+
### 3. Stable public Python API
23+
- **Issue**: [mkdocs/mkdocs#1240](https://github.com/mkdocs/mkdocs/issues/1240)
24+
- **👍**: 10 · 💬: 8
25+
- **Description**: There is no officially supported way to invoke MkDocs from Python code. Users currently call internal functions (e.g. `build_command()`, `serve_command()`) or shell out via `subprocess`. A documented, stable API (e.g. `mkdocs.build()`, `mkdocs.serve()`) is needed for build-system integrations, CI scripts, and programmatic usage.
26+
- **Labels**: `Enhancement`, `Needs design decision`
27+
28+
### 4. Remove hardcoded Google Analytics from theme
29+
- **Issue**: [mkdocs/mkdocs#3630](https://github.com/mkdocs/mkdocs/issues/3630)
30+
- **👍**: 8 · 💬: 1
31+
- **Description**: The `mkdocs` theme hardcodes a Google Analytics snippet via the `analytics` template tag block. This is out of place in a privacy-conscious static site generator. Proposal: drop the built-in GA support entirely and document how to add analytics via `extrahead` template overrides instead.
32+
- **Labels**: `Cleanup`
33+
34+
### 5. Support multiple `INHERIT` configs
35+
- **Issue**: [mkdocs/mkdocs#2624](https://github.com/mkdocs/mkdocs/issues/2624)
36+
- **👍**: 8 · 💬: 3
37+
- **Description**: `INHERIT` currently accepts only a single file path. Users with complex setups want to compose configuration from multiple files (e.g. one for markdown extensions, one for plugins, one for extra settings). Proposal: allow `INHERIT` to accept a list of paths.
38+
- **Labels**: `Configuration`
39+
40+
### 6. Fix `mkdocs serve --livereload` not triggering automatically
41+
- **Issue**: [mkdocs/mkdocs#4055](https://github.com/mkdocs/mkdocs/issues/4055)
42+
- **👍**: 25 · 💬: 6
43+
- **Description**: In recent versions, livereload no longer works unless `--livereload` is passed explicitly. mkdocs-ng **partially** addresses this through PRs restoring `--livereload`, but some users still report it not working by default. This may intersect with the Click version issue (#4032) and WSL-specific problems (#4081).
44+
- **Status in mkdocs-ng**: ✅ `--livereload` flag restored; default behaviour should be verified
45+
46+
### 7. `mkdocs serve` does not watch files (Click ≥ 8.3.0 regression)
47+
- **Issue**: [mkdocs/mkdocs#4032](https://github.com/mkdocs/mkdocs/issues/4032)
48+
- **👍**: 66 · 💬: 31
49+
- **Description**: Starting with Click 8.3.0, file watching breaks entirely — changes no longer trigger a rebuild. Workaround is pinning `click<=8.2.1`. This is the highest-reaction open issue by far.
50+
- **Status in mkdocs-ng**: needs verification — `pyproject.toml` currently allows `click >=7.0`; CI pins to `8.1.8` for min-version tests, but the runtime constraint does not prevent 8.3.0.
51+
52+
---
53+
54+
## ⚡ P1 – Important Features & Fixes
55+
56+
### 8. Live reload triggers on editor temp / hidden files
57+
- **Issue**: [mkdocs/mkdocs#2519](https://github.com/mkdocs/mkdocs/issues/2519)
58+
- **👍**: 7 · 💬: 18
59+
- **Description**: Editors like Vim create swap files (`.foo.md.swp`) and hidden files that cause `mkdocs serve` to constantly rebuild even though those files aren't included in the output. The watcher should ignore dot-files and editor temp files by default, with an opt-in mechanism for directories like `.well-known/`.
60+
- **Labels**: `Command - serve`, `Configuration`
61+
62+
### 9. Add `rel="external"` to outbound links
63+
- **Issue**: [mkdocs/mkdocs#3914](https://github.com/mkdocs/mkdocs/issues/3914)
64+
- **👍**: 7 · 💬: 0
65+
- **Description**: External (absolute URL) links should be automatically annotated with `rel="external"` so theme authors and users can style them differently (e.g. add an external-link icon). This became more important after Material for MkDocs switched to always using absolute URLs for navigation.
66+
- **Labels**: `Enhancement`
67+
68+
### 10. Cache busting for static assets
69+
- **Issue**: [mkdocs/mkdocs#1979](https://github.com/mkdocs/mkdocs/issues/1979)
70+
- **👍**: 5 · 💬: 34
71+
- **Description**: MkDocs has no built-in mechanism to append content hashes to CSS/JS filenames for cache busting. After a documentation site update, returning visitors may get stale cached assets. Implementation could be via a plugin (preferred by maintainers) or core feature.
72+
- **Labels**: `Enhancement`, `Plugins`
73+
74+
### 11. Decouple built-in search from core
75+
- **Issue**: [mkdocs/mkdocs#3698](https://github.com/mkdocs/mkdocs/issues/3698)
76+
- **👍**: 5 · 💬: 8
77+
- **Description**: The search plugin (based on lunr.js) is bundled with core MkDocs. lunr.js is unmaintained (last commit ~4 years ago) with known bugs. Proposal: extract search into a standalone installable package, decouple it from the core release cycle, and pave the way for a modern replacement.
78+
- **Labels**: `Search`
79+
80+
### 12. Decouple built-in themes from core
81+
- **Issue**: [mkdocs/mkdocs#3636](https://github.com/mkdocs/mkdocs/issues/3636)
82+
- **👍**: 4 · 💬: 17
83+
- **Description**: The core maintainers agreed to move the `readthedocs` theme (and possibly `mkdocs` theme) into separate repos and installable packages. This simplifies core, allows themes to be versioned independently, and opens the door for new default themes.
84+
- **Labels**: `Cleanup`
85+
86+
### 13. Support root directory as `docs_dir`
87+
- **Issue**: [mkdocs/mkdocs#3450](https://github.com/mkdocs/mkdocs/issues/3450) / [PR #3519](https://github.com/mkdocs/mkdocs/pull/3519)
88+
- **👍**: 3 · 💬: 15
89+
- **Description**: MkDocs currently forbids placing `mkdocs.yml` inside the `docs_dir`. Users who want to use the project root as `docs_dir` (e.g. monorepos, projects with `README.md` as homepage) need to work around this restriction. The PR #3519 removes the validation check and auto-excludes config/site files from the docs.
90+
- **Labels**: `Navigation`
91+
92+
---
93+
94+
## 📋 P2 – Nice to Have
95+
96+
### 14. Support text fragment links (ignore them during validation)
97+
- **Issue**: [mkdocs/mkdocs#3952](https://github.com/mkdocs/mkdocs/issues/3952)
98+
- **👍**: 3 · 💬: 0
99+
- **Description**: [Text fragment links](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments) (`#:~:text=…`) are a modern web standard for linking to specific text on a page. MkDocs' anchor validator incorrectly reports them as broken anchors. The validator should recognize and skip `#:~:text=` fragments.
100+
- **Labels**: `Validation`
101+
102+
### 15. Auto-switch port when the default port is busy
103+
- **Issue**: [mkdocs/mkdocs#3496](https://github.com/mkdocs/mkdocs/issues/3496)
104+
- **👍**: 3 · 💬: 0
105+
- **Description**: If port 8000 is already in use, `mkdocs serve` should automatically try the next available port (8001, 8002, …) instead of failing. A related PR (#3498) adds a manual port override flag, but automatic fallback is the desired UX.
106+
- **Labels**: `Command - serve`
107+
108+
### 16. Smart section titles when no nav is configured
109+
- **Issue**: [mkdocs/mkdocs#3356](https://github.com/mkdocs/mkdocs/issues/3356)
110+
- **👍**: 3 · 💬: 6
111+
- **Description**: When no `nav` is defined in `mkdocs.yml`, section titles for sub-directories should be derived from the index page's title metadata or first heading, rather than displaying raw directory names. This is already a feature in Material for MkDocs (`navigation.smart-section-titles`), but should be available in core.
112+
- **Labels**: `Navigation`, `Titles`
113+
114+
### 17. Support GitHub-style Markdown Alerts
115+
- **Issue**: [mkdocs/mkdocs#3997](https://github.com/mkdocs/mkdocs/issues/3997)
116+
- **👍**: 2 · 💬: 2
117+
- **Description**: GitHub-flavored markdown alert blocks (`> [!NOTE]`, `> [!TIP]`, `> [!IMPORTANT]`, `> [!WARNING]`, `> [!CAUTION]`) should render as styled callouts in MkDocs. This would improve portability of docs authored on GitHub to MkDocs sites.
118+
119+
### 18. Extend `on_page_context` with Jinja2 Environment reference
120+
- **Issue**: [mkdocs/mkdocs#3709](https://github.com/mkdocs/mkdocs/issues/3709)
121+
- **👍**: 2 · 💬: 1
122+
- **Description**: The `on_page_context` plugin event should expose the Jinja2 `Environment` object so plugins can apply per-page template filters and globals. This is needed for multi-instance plugins (e.g. Material for MkDocs blog plugin) where each plugin instance needs to register its own template functions per page.
123+
124+
### 19. Deprecated options should emit `INFO`, not `WARNING`
125+
- **Issue**: [mkdocs/mkdocs#3696](https://github.com/mkdocs/mkdocs/issues/3696)
126+
- **👍**: 2 · 💬: 5
127+
- **Description**: The `Deprecated` config helper emits `WARNING` messages, which break `--strict` mode. Since deprecated options are still functional (just discouraged), they should emit `INFO`-level messages so strict builds don't fail on deprecation notices alone.
128+
129+
### 20. Custom import paths for `markdown_extensions`
130+
- **Issue**: [mkdocs/mkdocs#3772](https://github.com/mkdocs/mkdocs/issues/3772)
131+
- **👍**: 1 · 💬: 29
132+
- **Description**: Users who write small project-specific Markdown extensions need a way to add the extension's directory to `sys.path` from within `mkdocs.yml`, without requiring `PYTHONPATH` hacks or pip-installable packages. A config option like `markdown_extensions_path: ["extensions/"]` would suffice.
133+
134+
### 21. Respect display text when the same `.md` file appears in nav multiple times
135+
- **Issue**: [mkdocs/mkdocs#3710](https://github.com/mkdocs/mkdocs/issues/3710)
136+
- **👍**: 2 · 💬: 3
137+
- **Description**: When a file is referenced multiple times in `nav` with different display names (e.g. `- 'French Main Dishes': 'French Cuisine.md'` and `- 'French Desserts': 'French Cuisine.md'`), MkDocs now overrides both entries with the first title encountered. Previously, each entry kept its set display text.
138+
139+
---
140+
141+
## 🔧 P3 – Maintenance & Infrastructure
142+
143+
### 22. New default theme
144+
- **Issue**: [mkdocs/mkdocs#3680](https://github.com/mkdocs/mkdocs/issues/3680)
145+
- **👍**: 0 · 💬: 6
146+
- **Description**: The default `mkdocs` theme is dated (Bootstrap 3). A new, modern, optionally installable default theme should be designed and shipped separately, as part of the theme decoupling effort (#3636).
147+
148+
### 23. Title source precedence controls
149+
- **Issue**: [mkdocs/mkdocs#3532](https://github.com/mkdocs/mkdocs/issues/3532)
150+
- **👍**: 0 · 💬: 37
151+
- **Description**: When a page has both a YAML `title` meta field and an H1 heading, the precedence between them (and the `nav` display name) can be surprising. Users want more control over which source wins, ideally configurable per page or globally.
152+
153+
### 24. Fix `use_directory_urls: true` with Click ≥ 8.2.2
154+
- **Issue**: [mkdocs/mkdocs#4014](https://github.com/mkdocs/mkdocs/issues/4014)
155+
- **👍**: 7 · 💬: 5
156+
- **Description**: Click 8.2.2 changed path behavior that broke `use_directory_urls: true` — generated links become `page/index.html` instead of `page/`. This is related to #4032 and may require pinning or fixing the Click integration.
157+
- **Status in mkdocs-ng**: unknown — needs testing with Click ≥ 8.2.2
158+
159+
### 25. WSL: `mkdocs serve` fails to live reload
160+
- **Issue**: [mkdocs/mkdocs#4081](https://github.com/mkdocs/mkdocs/issues/4081)
161+
- **👍**: 2 · 💬: 2
162+
- **Description**: On WSL with ext4 filesystem, file-watching doesn't trigger livereload. May be related to the Click watcher regression (#4032) or filesystem notification limitations in WSL.
163+
164+
---
165+
166+
*Last updated: 2026-04-29*
167+
*Sources: [mkdocs/mkdocs open issues](https://github.com/mkdocs/mkdocs/issues), sorted by reactions*

0 commit comments

Comments
 (0)