Skip to content

Conversation

@Samreay
Copy link
Contributor

@Samreay Samreay commented Oct 24, 2025

Should resolve #648, and Ive tested the docs build, copier, and jekyll site rebuild and it seems good. Welcome some more eyes on it though!


📚 Documentation preview 📚: https://scientific-python-cookie--662.org.readthedocs.build/

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds MkDocs as a documentation option to the cookiecutter template, allowing users to choose between Sphinx and MkDocs when creating a new project. This addresses issue #648 by providing an alternative documentation framework that is simpler to set up and increasingly popular in the Python community.

Key Changes:

  • Added MkDocs as a new documentation tool choice in the cookiecutter template
  • Created MkDocs-specific template files and configuration
  • Updated documentation guides to cover both Sphinx and MkDocs options

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
cookiecutter.json Added "docs" option with sphinx/mkdocs choices
copier.yml Added docs selection configuration
{{cookiecutter.project_name}}/mkdocs.yml Template for MkDocs configuration file
{{cookiecutter.project_name}}/docs/index.md MkDocs homepage template
{{cookiecutter.project_name}}/docs/api.md MkDocs API documentation template
{{cookiecutter.project_name}}/src/.../example.py Example class with docstrings for API generation
{{cookiecutter.project_name}}/pyproject.toml Conditional docs dependencies based on selected tool
{{cookiecutter.project_name}}/noxfile.py Conditional nox sessions for Sphinx vs MkDocs
{{cookiecutter.project_name}}/README.md Removed Sphinx-specific comment
{{cookiecutter.project_name}}/.readthedocs.yaml Conditional build commands for each docs tool
noxfile.py Added Docs enum and parametrized all test sessions with docs option
tests/test_readthedocs.py Removed obsolete RTD104 tests
docs/pages/tutorials/docs.md Updated tutorial to mention both Sphinx and MkDocs
docs/pages/guides/docs.md Comprehensive guide covering both documentation frameworks
docs/README.md Updated rbenv version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

henryiii and others added 7 commits November 6, 2025 00:22
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- search.suggest
- search.highlight
- navigation.expand
- navigation.tracking
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration comment claims this feature enables URL auto-update as users scroll, but navigation.tracking actually updates the URL to match the active navigation item when navigating sections, not during scrolling.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, you might want to look into this and see if it's correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have just tried turning this feature on and off in my own repo and can confirm that with the feature and can confirm that its responsible for my URL updates as I scroll through different anchors

henryiii and others added 4 commits November 6, 2025 11:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii merged commit 141396d into scientific-python:main Nov 6, 2025
27 checks passed
@henryiii
Copy link
Collaborator

henryiii commented Nov 6, 2025

Thanks! Might iterate on it a bit more eventually, but it's great to have!

@Samreay
Copy link
Contributor Author

Samreay commented Nov 6, 2025

Thanks Henry! And from the number of commits you had to add, my apologies for all the things I missed

@henryiii
Copy link
Collaborator

henryiii commented Nov 6, 2025

That's fine, you got it most of the way there (and got all the stuff I'm not as familiar with done, like setup for mkdocs), most of it was just filling out all the little places that get affected with a new option.

@henryiii
Copy link
Collaborator

I hadn't noticed that MkDocs became basically unmaintained in August 2024, and Material for MkDocs is being replaced by zensical, and will be retired in 12 months. We probably should either move this to Zensical if that makes sense, or remove it until a replacement is available? For now we probably should just put a little warning about using MkDocs.

@Samreay
Copy link
Contributor Author

Samreay commented Nov 13, 2025

TIL about zensical! Yeah this makes sense, and I'd be happy to do a PR for a swap over when the tool is out of alpha. I've joined the newsletter to stay in the loop. Happy for a PR now adding a note to the Mkdocs section? I see they've got a lot done, but the two main gaps IMHO are the current lack of example gallery and jupyter tutorials. Seems like they'll need the plugin system working for this.

@henryiii
Copy link
Collaborator

Yes, we should add a little note block, and I would also like for the sections to be arranged of the two different tabs have the same order. I noticed that the requirements was first in one and near the bottom and the other.

I can do it (eventually) if you can’t get to it.

@Samreay
Copy link
Contributor Author

Samreay commented Nov 13, 2025

PR added to your workload! #688

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.

Provide first-class tutorial for mkdocs, not just for sphinx

2 participants