Skip to content
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

feat(docs): Replace mdbook with mkdocs workflow #1548

Merged
merged 145 commits into from
Aug 28, 2024
Merged

Conversation

Zeglius
Copy link
Contributor

@Zeglius Zeglius commented Aug 26, 2024

PR #1441 was meant to address:

  1. Lack of up-to-date offline documentation shipped with a Bazzite image.
  2. Adding tooling to progressively moving documentation from Discourse to GitHub (if wished so).

Which was accomplished:

  1. PDF generation out of documentation, which is then downloaded and added in the image build action (feat: Add offline documentation #1530).
  2. Adding fetch_discourse_md.py, a script that facilitates scrapping of Discourse pages, both automatically by mdbook and contributors who wish to transcribe to a markdown file in GitHub.

It works, but would come to face several limitations imposed by mdbook:

  1. MdBook ecosystem is written in Rust, which add complexity to develop preprocessors in simpler languages (ex.: python).
  2. Related to limitation 1, plugin ecosystem is far more scarce, increasing the amount of self-developed solutions.
  3. The current translation plugin (mdbook-i18n-helpers) is far too complex for translators, as uses Gettext. Not a bad tool, but far too overkill for our purpose.
  4. Part of limitation 3, increased workarounds to deal with the default build output file layout, which can be potentially prone to errors.

Thus, MkDocs enters in scene:

  1. Written in Python, far more populated plugin ecosystem.
  2. Plugin API is way friendlier with hooks.
  3. Less complex translation with mkdocs-static-i18n, using markdown files like article.es.md instead of using Gettext.

Not only that, but we replace the PDF generation with a locally hosted version of the documentation, which can be served with python -m http.server (documentation shortcut handles this).
Far more friendly for Steam Game Mode users, as they can then access from Steam builtin web browser.

Zeglius added 30 commits July 31, 2024 14:29
Using Discourse urls as fallback for missing content for now

docs: add missing image files
docs: Add missing warning in Advanced docs in summary

docs: add missing waydroid guide

docs: rename files to avoid spaces

docs: fix badly set docs build params

docs: remove unnecesary placeholders
This section contains a table of contents of the documentation
docs: add missing symlink to resources
docs: Move debug preprocessor util to utils
Now we can exclude files from being processed with blob patterns
@Zeglius Zeglius marked this pull request as ready for review August 28, 2024 19:24
@Zeglius Zeglius requested a review from HikariKnight as a code owner August 28, 2024 19:24
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. documentation Improvements or additions to documentation labels Aug 28, 2024
@KyleGospo KyleGospo enabled auto-merge August 28, 2024 19:38
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 28, 2024
Copy link
Contributor

@nicknamenamenick nicknamenamenick left a comment

Choose a reason for hiding this comment

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

My approval doesn't affect whether or not this merges, but you got my seal of approval!!!!!

@KyleGospo KyleGospo disabled auto-merge August 28, 2024 22:48
@KyleGospo KyleGospo merged commit 0e18978 into ublue-os:main Aug 28, 2024
2 of 4 checks passed
@Zeglius Zeglius deleted the mkdocs branch August 29, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants