document mkdocs experiment authored by anarcat's avatar anarcat
...@@ -573,6 +573,48 @@ Staff hours, hosting costs shadowed by GitLab. ...@@ -573,6 +573,48 @@ Staff hours, hosting costs shadowed by GitLab.
[Nanoc]: https://nanoc.ws/ [Nanoc]: https://nanoc.ws/
### mkdocs
I did a quick test of mkdocs to see if it could render the TPA wiki
without too many changes. The [result](https://paste.anarc.at/publish/2021-10-22-_GMTXBk9IcmLXMlXGGEGjitDFmpf3gZ3R5TjPG738IU/) is not so bad! I am not a
fan of the mkdocs theme, but it does work, and has prev/next links
like a real book which is a nice touch (although maybe not useful for
us, outside of meetings maybe). Navigation is still manual (defined in
the configuration file instead of a sidebar).
Syntax is not entirely compatible, unfortunately. The GitLab wiki has
this unfortunate habit of expecting "semi-absolute" links everywhere,
which means that to link to (say) this page, we do:
[documentation service](service/documentation)
... from anywhere in the wiki. It seems like mkdocs expects relative
links, so this would be the same from the homepage, but from the
service list it should be:
[documentation service](documentation)
... and from a sibling page:
[documentation service](../documentation)
Interestingly, mkdocs warns us about broken links directly, which is a
nice touch. It found this:
```
WARNING - Documentation file 'howto.md' contains a link to 'old/new-machine.orig' which is not found in the documentation files.
WARNING - Documentation file 'old.md' contains a link to 'old/new-machine.orig' which is not found in the documentation files.
WARNING - Documentation file 'howto/new-machine.md' contains a link to 'howto/install.drawio' which is not found in the documentation files.
WARNING - Documentation file 'howto/rt.md' contains a link to 'howto/org/operations/Infrastructure/rt.torproject.org' which is not found in the documentation files.
WARNING - Documentation file 'policy/tpa-rfc-1-policy.md' contains a link to 'policy/workflow.png' which is not found in the documentation files.
WARNING - Documentation file 'policy/tpa-rfc-9-proposed-process.md' contains a link to 'policy/workflow.png' which is not found in the documentation files.
WARNING - Documentation file 'service/forum.md' contains a link to 'service/team@discourse.org' which is not found in the documentation files.
WARNING - Documentation file 'service/lists.md' contains a link to 'service/org/operations/Infrastructure/lists.torproject.org' which is not found in the documentation files.
```
A full rebuild of the site takes 2.18 seconds. Incremental rebuilds
are not faster, which is somewhat worrisome.
### Testing ### Testing
To use those tests, we'd need to switch the wiki into a Git To use those tests, we'd need to switch the wiki into a Git
... ...
......