Skip to content

Conversation

@gortiz
Copy link
Contributor

@gortiz gortiz commented Nov 28, 2025

In apache/pinot#17281, I proposed migrating the documentation from GitBook to MkDocs.

Important

This PR is intended to be an example of how to migrate the doc content from GitBook to MkDocs, but it is not complete and even if it were, merging this PR would mean GitBook would stop working. Please do not merge this PR

Description

This PR shows how to do that. All pages can currently be rendered with MkDocs, but some proprietary GitBook extensions need to be migrated to the Material for MkDocs syntax. I included a copilot-instruction file that helps with the migration and can also be used as a comprehensive list of the changes I found we need to apply.

The following files have been migrated:

  • docs/basics/architecture.md (a good example of the kind of changes we need to apply to migrate GitBook extensions)
  • README.md (now called docs/README.md)
  • basics/getting-started/README.md (now called docs/basics/getting-started/README.md)
  • basics/components/README.md (now called docs/basics/components/README.md)
  • basics/components/cluster/broker.md, where I found an image whose link is broken in the official GitBook tools but we didn't know.

To serve docs locally, you can run:

poetry run mkdocs serve --livereload`

By doing so, you will get a long list of warnings. Most of them say that some link is broken. Most (if not all) are showing cases where the current documentation link is incorrectly written. As explained in the Pinot issue, one of the main advantages of moving to MkDocs is that, once we fix all current broken links, we can add a GHA check that prevents PRs from being merged if they introduce broken links.

As an example, when migrating basics/components/cluster/broker.md, I saw the following error message in the log:

WARNING -  Doc file 'basics/components/cluster/broker.md' contains a link 'broker-time-boundary-diagram.jpg.jpg', but the target 'basics/components/cluster/broker-time-boundary-diagram.jpgjpg' is not found among documentation files.

The problem here is that the file is called broker-time-boundary-diagram.jpg.jpg while the file on disk is called broker-time-boundary-diagram.jpg. Although this is just a warning, if mkdocs is served in strict mode, the process fails in cases like this. By compiling the docs in this mode in GHA we can prevent this erros to happen in the future

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