Skip to content

Move to mkdocs #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 113 commits into from
Aug 5, 2025
Merged

Move to mkdocs #346

merged 113 commits into from
Aug 5, 2025

Conversation

ItsDrike
Copy link
Member

@ItsDrike ItsDrike commented Aug 1, 2024

This removes Sphinx in favor of mkdocs for the project documentation.

Mkdocs is a major improvement on Sphinx, bringing us modern looking UI and markdown-based documentation source (rather than rst based with sphinx). The mkdocs syntax is much easier to follow and their usage documentation is a lot more user-friendly, making it generally much easier to write new documentation.

This PR doesn't just move the existing documentation over to mkdocs, rather, it's pretty much a complete rewrite, introducing a lot of new content and greatly modifying almost all of the old pages. This PR fully completes the project documentation task (#19).

Warning

Python docstrings originally written for Sphinx aren't entirely compatible with mkdocs. Even though some basic sphinx formatting is supported a lot of the things aren't and mkdocs is better suited for different docstring formats, like the google or numpy formats, with additional formatting being just the mkdocs markdown. Instead of going with a limiting sphinx format with a weird mix of rst & markdown, I've decided to abandon the sphinx format in favor of Google docstring format.

This almost certainly means that this will break any other PRs (well, at least those that did any modifications to docstrings in code). Of course, PRs that made modifications to the old docs will also need to be fixed.


  • Automatic deployment to GitHub pages
  • Versioned docs
  • Meta pages
    • Introduction
    • Installation category
      • Installation guide
      • Versioning Model
        • Version guarantees
        • Our versioning practices (how mcproto updates with mc protocol updates)
      • Changelog (released changes)
        • Show the existing CHANGELOG.md file in the docs
        • Show upcomming changes using some kind of towncrier integration
  • Usage guides
    • Authentication
    • Manual (low-level) mcproto usage (example from readme)
    • Usage with packet classes (example from readme)
  • Frequently Asked Questions?
    • Why some methods lack sync alternatives (see existing page here)
  • Community category
    • Code of Conduct
    • Attributions
    • License
  • Contributing category
    • Reporting a bug
    • Proposing a feature?
    • Asking a question
    • Making a pull request
    • Security Policy
    • Contributing guidelines
      • Index
      • Setting up the project
      • Style Guide
      • API Reference
        • Docstring formatting directive
        • How to add something to the API docs (like a new module)
        • What to include into the public API → delegated to griffe docs link
        • How to document private APIprivate API will NOT be documented
      • Type hinting
      • Slotscheck
      • Pre-commit
      • Changelog
      • Great commits
      • Unit Tests
      • Breaking changes & Deprecations
      • Writing Documentation
  • API Reference
    • Basic setup for docs autogeneration
    • Outline which features belong to public API and which are considered internal/private
    • Resolve Sphinx style incompatibilities
      • Change all docstrings to Google style
    • Solve issue with duplicate headers between private & public docs, leading to warnings → private API will NOT be documented
    • Replace all links to wiki.vg with links to minecraft.wiki

@ItsDrike ItsDrike added a: documentation Related to project's documentation (comments, docstrings, docs) p: 2 - normal Should be done reasonably soon, but not urgent/blocking t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.) labels Aug 1, 2024
@ItsDrike ItsDrike force-pushed the mkdocs branch 6 times, most recently from f9597f3 to 8288c8f Compare August 1, 2024 21:39
Copy link

github-actions bot commented Aug 1, 2024

PR Preview Action v1.6.2

🚀 View preview at
https://py-mine.github.io/mcproto/pr-preview/pr-346/

Built to branch gh-pages at 2025-08-05 16:21 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@ItsDrike ItsDrike force-pushed the mkdocs branch 17 times, most recently from cf79918 to e665de7 Compare August 6, 2024 18:23
@ItsDrike ItsDrike force-pushed the mkdocs branch 2 times, most recently from 557b7a8 to 0a8188c Compare August 9, 2024 00:51
@py-mine-ci-bot py-mine-ci-bot bot removed the s: stale Has had no activity for a while (will be closed for inactivity/marked up for grabs soon) label Jun 23, 2025
The original workflow somewhat naively ran deploy and always tried to
push the built docs to the repo pages, which is however very unsafe to
do from forks, not to mention that it wouldn't work anyways, since write
access & secrets aren't available when the workflow is ran from forks on
the `pull_request` trigger.

It is a little annoying that we can't safely show the docs preview page
for fork PRs, but it's the only safe way to go about this, and the docs
building will still occur, to make sure that there are no build fails.
This was done to avoid confusion by LSPs (like yamlls) that might think
this is the mkdocs configuration file, rather than a github workflow
file.
@ItsDrike ItsDrike marked this pull request as ready for review August 5, 2025 16:23
@ItsDrike ItsDrike merged commit 3e7f9a1 into main Aug 5, 2025
10 of 11 checks passed
@ItsDrike ItsDrike deleted the mkdocs branch August 5, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: documentation Related to project's documentation (comments, docstrings, docs) p: 1 - high Blocks other tasks / Important bug t: revision Complete or partial rewrite of something (code cleanup, performance improvements, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decide on final versioning structure Add project documentation
1 participant