Problem
README.MD and docs/index.md are currently identical files maintained in parallel. Any documentation change must be applied twice or the files drift. This is already happening in practice — the files have to be manually kept in sync on every PR.
Recommended fix
Configure MkDocs to read README.MD directly as the home page, eliminating docs/index.md entirely.
Option A — docs_dir: . (minimal change)
Change mkdocs.yml:
docs_dir: .
nav:
- Home: README.MD
- Math Rendering Test File: docs/MathRenderingTestFile.md
- Prepare For Mac User: docs/PrepareForMacUser.md
- Prepare For Windows User: docs/PrepareForWindowsUser.md
Then delete docs/index.md. README.MD becomes the single source of truth for both the GitHub repo homepage and the MkDocs site.
Trade-off: MkDocs will scan the entire repo root for .md files, which may produce warnings for files like CONTRIBUTING.md, LICENSE.md, etc. that aren't in the nav. These can be suppressed with exclude_docs: in mkdocs.yml.
Option B — pymdownx.snippets include (no restructure needed)
Keep docs_dir: docs and replace docs/index.md with a one-liner that includes the README:
Add the extension to mkdocs.yml:
markdown_extensions:
- pymdownx.snippets
And add pymdownx-extensions to the docs optional dependency group in pyproject.toml.
Trade-off: Adds a new dependency; slightly more indirection.
Recommendation
Option A is simpler and has no new dependencies. Option B avoids restructuring the docs/ directory if that's preferred.
Either way, the fix eliminates a whole class of "forgot to update both files" bugs.
Problem
README.MDanddocs/index.mdare currently identical files maintained in parallel. Any documentation change must be applied twice or the files drift. This is already happening in practice — the files have to be manually kept in sync on every PR.Recommended fix
Configure MkDocs to read
README.MDdirectly as the home page, eliminatingdocs/index.mdentirely.Option A —
docs_dir: .(minimal change)Change
mkdocs.yml:Then delete
docs/index.md.README.MDbecomes the single source of truth for both the GitHub repo homepage and the MkDocs site.Trade-off: MkDocs will scan the entire repo root for
.mdfiles, which may produce warnings for files likeCONTRIBUTING.md,LICENSE.md, etc. that aren't in the nav. These can be suppressed withexclude_docs:inmkdocs.yml.Option B —
pymdownx.snippetsinclude (no restructure needed)Keep
docs_dir: docsand replacedocs/index.mdwith a one-liner that includes the README:Add the extension to
mkdocs.yml:And add
pymdownx-extensionsto thedocsoptional dependency group inpyproject.toml.Trade-off: Adds a new dependency; slightly more indirection.
Recommendation
Option A is simpler and has no new dependencies. Option B avoids restructuring the
docs/directory if that's preferred.Either way, the fix eliminates a whole class of "forgot to update both files" bugs.