doc: drop reStructuredText support from ./mach doc
Categories
(Developer Infrastructure :: Source Documentation, task)
Tracking
(firefox157 fixed)
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: Sylvestre)
References
(Blocks 1 open bug)
Details
Attachments
(7 external files)
The in-tree documentation is now written entirely in Markdown, so ./mach doc no longer needs to parse reStructuredText.
Two things still produce RST:
build/docs/mozbuild-symbols.rst, the last.rstfile left in the documentation build.sphinx.ext.apidoc, which generates the Python API reference pages (python/mozbuild,python/mach, ...) as.rstat build time.
Dropping .rst from source_suffix in docs/conf.py requires:
- converting
build/docs/mozbuild-symbols.rstand reworking themozbuildsymbolsdirective inpython/mozbuild/mozbuild/sphinx.py, which relies onstate_machine.insert_input()(not implemented by MyST's mock state machine); - pointing
sphinx.ext.apidocat MyST templates so the Python API pages are generated as Markdown; - cleaning up the remaining
.rstreferences indocs/config.yml,tools/moztreedocs/, and in the documentation about the documentation.
eval-rst blocks stay supported: they are a MyST feature, independent of source_suffix, and are used to embed autodoc output whose docstrings are written in RST.
| Assignee | ||
Comment 1•3 months ago
|
||
The mozbuildsymbols directive fed its generated reStructuredText back into the
including document with state_machine.insert_input(), which MyST does not
implement, so the page could not be converted to Markdown. Parse the generated
rst in a document of its own instead and return the resulting nodes.
Two details the move needs: the nodes cache the document they were parsed in,
which breaks the parent chain sphinx.ext.autosectionlabel walks, and the
mozbuild_subcontext_* targets are recorded on the throwaway document, so they
have to be carried over to stay referenceable.
Updated•3 months ago
|
| Assignee | ||
Comment 2•3 months ago
|
||
sphinx.ext.apidoc emits reStructuredText by default, which is the last thing
in the build producing rst. Point it at Markdown templates and generate the
pages with a .md suffix. The automodule calls stay inside eval-rst fences
so the Python docstrings, which are written in rst, keep being parsed as rst.
The marionette docstrings relied on named hyperlink targets, whose definitions
do not resolve across an eval-rst boundary; use embedded URIs instead. Also
update the links pointing at the generated marionette_driver page.
| Assignee | ||
Comment 3•3 months ago
|
||
Every page is Markdown now, so drop .rst from source_suffix and clean up the
.rst references left in the configuration, in mach doc itself, and in the
documentation about the documentation.
eval-rst blocks are unaffected: they are a MyST feature, independent of
source_suffix.
| Assignee | ||
Comment 4•3 months ago
|
||
The rst linter was removed in bug 2038819, so these % rstcheck: comments no
longer configure anything.
| Assignee | ||
Comment 5•3 months ago
|
||
The perfdocs linter reads index.md and metrics.md; the page still described
them as rst files.
| Assignee | ||
Comment 6•3 months ago
|
||
Drop the rstcheck linter, removed in bug 2038819, from the mozlint skill, and
the mentions of .rst sources from the documentation skill.
| Assignee | ||
Comment 7•3 months ago
|
||
The mzl.la shortlink and the Add-on Manager page on MDN are both gone.
Point at the in-tree localization docs and at the AddonManager.ERROR_*
constants instead.
Updated•2 months ago
|
https://hg.mozilla.org/mozilla-central/rev/cd07e5e07f7c
https://hg.mozilla.org/mozilla-central/rev/d130c6e1368d
https://hg.mozilla.org/mozilla-central/rev/e308123a029e
https://hg.mozilla.org/mozilla-central/rev/e1bfe88461f7
https://hg.mozilla.org/mozilla-central/rev/6b5dac011326
https://hg.mozilla.org/mozilla-central/rev/8c960b512c39
https://hg.mozilla.org/mozilla-central/rev/894540a4bf25
Description
•