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

Switch to MkDocs #178

Closed
MatthewCroughan opened this issue Mar 15, 2021 · 2 comments
Closed

Switch to MkDocs #178

MatthewCroughan opened this issue Mar 15, 2021 · 2 comments

Comments

@MatthewCroughan
Copy link
Contributor

MatthewCroughan commented Mar 15, 2021

Things we can't do without great difficulty in Sphinx:

  • Insert device related info on a page (with conditionals) Implement substitutions for smarter docs  #164 (comment)

  • E.g: If this page has the "imx8mm" tag, then insert a link in a note at the bottom
    of page

  • Collaborate easily as a team (All written in markdown)

    • Well thought out and separated functionality for
      • Writers (Us)
      • Designers (Milo)
      • Contributors (Anyone)
        This is demonstrated here

Who uses it?

Benefits

  • Most of the Sphinx plugins we are using are native functionality in MkDocs.

  • No cruft. Sphinx was developed to document Python code, thus has a lot of
    superfluous functionality that often gets in the way of the way we want to
    document normal things. This is primarily why RST is used.

    • Cares about indendation (Makes development slower and expression of spaces and newlines harder due to the amount of technicalities with indentation)
    • Too strict (Makes CI really hard due to false positive errors that cannot easily be ignored or turned off)
  • Better SEO (via tags and author details, etc.) SEO enhancements / requests #137

Notes

  • Small but determined community, available in the #mkdocs IRC

    • Usually pretty responsive
    • Issues are fixed in days
  • Written in Python, just like Sphinx.

  • Provides Jinja templating with conditionals as native functionality

  • Is just plain better than Sphinx for what we're doing

Yocto developers

Wrote their own incomplete pre-processor just to replace ampersand &variable's

These variables are global, meaning we still cannot make smart pages and
templates that fill out depending on local variables like the architecture the
file says it represents - using markdown tags/labels for example: (%arm64,
%riscv64, %etc).

  • Nicolas Dechesne had to write these pre-processors in Python
    Commit1
    Commit2
@MatthewCroughan
Copy link
Contributor Author

From time to time, we struggle with redirects. Redirects are made manageable in MkDocs without modifying the webserver configuration via this plugin https://pypi.org/project/mkdocs-redirects/

@kprosise
Copy link
Contributor

Reasoning copied to confluence as arguments in support of MkDocs.Closing issue.

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 a pull request may close this issue.

2 participants