diff options
author | Nicholas Chin <nic.c3.14@gmail.com> | 2023-02-21 19:41:06 -0700 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2024-03-21 16:11:56 +0000 |
commit | 35599f9a6671779a377443ae6e596367a7613e22 (patch) | |
tree | c765d9b3404c7d1b3d72c780f62f7ff3e18adbad /Documentation/releases | |
parent | 9203e25a3539a3a1e55ea12b3bfa4d15f0aa0304 (diff) |
Docs: Replace Recommonmark with MyST Parser
Recommonmark has been deprecated since 2021 [1] and the last release was
over 3 years ago [2]. As per their announcement, Markedly Structured
Text (MyST) Parser [3] is the recommended replacement.
For the most part, the existing documentation is compatible with MyST,
as both parsers are built around the CommonMark flavor of Markdown. The
main difference that affects coreboot is how the Sphinx toctree is
generated. Recommonmark has a feature called auto_toc_tree, which
converts single level lists of references into a toctree:
* [Part 1: Starting from scratch](part1.md)
* [Part 2: Submitting a patch to coreboot.org](part2.md)
* [Part 3: Writing unit tests](part3.md)
* [Managing local additions](managing_local_additions.md)
* [Flashing firmware](flashing_firmware/index.md)
MyST Parser does not provide a replacement for this feature, meaning the
toctree must be defined manually. This is done using MyST's syntax for
Sphinx directives:
```{toctree}
:maxdepth: 1
Part 1: Starting from scratch <part1.md>
Part 2: Submitting a patch to coreboot.org <part2.md>
Part 3: Writing unit tests <part3.md>
Managing local additions <managing_local_additions.md>
Flashing firmware <flashing_firmware/index.md>
```
Internally, auto_toc_tree essentially converts lists of references into
the Sphinx toctree structure that the MyST syntax above more directly
represents.
The toctrees were converted to the MyST syntax using the following
command and Python script:
`find ./ -iname "*.md" | xargs -n 1 python conv_toctree.py`
```
import re
import sys
in_list = False
f = open(sys.argv[1])
lines = f.readlines()
f.close()
with open(sys.argv[1], "w") as f:
for line in lines:
match = re.match(r"^[-*+] \[(.*)\]\((.*)\)$", line)
if match is not None:
if not in_list:
in_list = True
f.write("```{toctree}\n")
f.write(":maxdepth: 1\n\n")
f.write(match.group(1) + " <" + match.group(2) + ">\n")
else:
if in_list:
f.write("```\n")
f.write(line)
in_list = False
if in_list:
f.write("```\n")
```
While this does add a little more work for creating the toctree, this
does give more control over exactly what goes into the toctree. For
instance, lists of links to external resources currently end up in the
toctree, but we may want to limit it to pages within coreboot.
This change does break rendering and navigation of the documentation in
applications that can render Markdown, such as Okular, Gitiles, or the
GitHub mirror. Assuming the docs are mainly intended to be viewed after
being rendered to doc.coreboot.org, this is probably not an issue in
practice.
Another difference is that MyST natively supports Markdown tables,
whereas with Recommonmark, tables had to be written in embedded rST [4].
However, MyST also supports embedded rST, so the existing tables can be
easily converted as the syntax is nearly identical.
These were converted using
`find ./ -iname "*.md" | xargs -n 1 sed -i "s/eval_rst/{eval-rst}/"`
Makefile.sphinx and conf.py were regenerated from scratch by running
`sphinx-quickstart` using the updated version of Sphinx, which removes a
lot of old commented out boilerplate. Any relevant changes coreboot had
made on top of the previous autogenerated versions of these files were
ported over to the newly generated file.
From some initial testing the generated webpages appear and function
identically to the existing documentation built with Recommonmark.
TEST: `make -C util/docker docker-build-docs` builds the documentation
successfully and the generated output renders properly when viewed in
a web browser.
[1] https://github.com/readthedocs/recommonmark/issues/221
[2] https://pypi.org/project/recommonmark/
[3] https://myst-parser.readthedocs.io/en/latest/
[4] https://doc.coreboot.org/getting_started/writing_documentation.html
Change-Id: I0837c1722fa56d25c9441ea218e943d8f3d9b804
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73158
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'Documentation/releases')
-rw-r--r-- | Documentation/releases/boards_supported_on_branches.md | 26 | ||||
-rw-r--r-- | Documentation/releases/checklist.md | 2 | ||||
-rw-r--r-- | Documentation/releases/coreboot-4.17-relnotes.md | 6 | ||||
-rw-r--r-- | Documentation/releases/coreboot-4.19-relnotes.md | 2 | ||||
-rw-r--r-- | Documentation/releases/coreboot-4.20.1-relnotes.md | 2 | ||||
-rw-r--r-- | Documentation/releases/coreboot-4.21-relnotes.md | 2 | ||||
-rw-r--r-- | Documentation/releases/coreboot-4.22-relnotes.md | 4 | ||||
-rw-r--r-- | Documentation/releases/index.md | 56 | ||||
-rw-r--r-- | Documentation/releases/templates.md | 2 |
9 files changed, 57 insertions, 45 deletions
diff --git a/Documentation/releases/boards_supported_on_branches.md b/Documentation/releases/boards_supported_on_branches.md index ad7f356d63..6da7412212 100644 --- a/Documentation/releases/boards_supported_on_branches.md +++ b/Documentation/releases/boards_supported_on_branches.md @@ -26,7 +26,7 @@ anyone using that release. ## [4.19 Release](coreboot-4.19-relnotes.md) Branch created, builder configured -```eval_rst +```{eval-rst} +-------------------------------+------------------------+------------+-----------+ | Vendor/Board | Processor | Date added | Brd type | +===============================+========================+============+===========+ @@ -37,7 +37,7 @@ Branch created, builder configured ## [4.18 Release](coreboot-4.18-relnotes.md) Branch created, builder configured -```eval_rst +```{eval-rst} +-------------------------------+------------------------+------------+-----------+ | Vendor/Board | Processor | Date added | Brd type | +===============================+========================+============+===========+ @@ -120,7 +120,7 @@ Branch created, builder configured ## [4.13 Release](coreboot-4.13-relnotes.md) Tag only -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -132,7 +132,7 @@ Tag only Branch created, builder configured -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -148,7 +148,7 @@ Branch created, builder configured Branch created, builder configured -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -251,7 +251,7 @@ Branch created, builder configured ## [4.10 Release](coreboot-4.10-relnotes.md) Branch created -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -263,7 +263,7 @@ Branch created ## [4.9 Release](coreboot-4.9-relnotes.md) Tag only -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -281,7 +281,7 @@ Tag only ## [4.8.1 Release](coreboot-4.8.1-relnotes.md) Branch created -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -417,7 +417,7 @@ Branch created ## [4.7 Release](coreboot-4.7-relnotes.md) Tag only -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -504,7 +504,7 @@ Tag only ## [4.6](coreboot-4.6-relnotes.md) Tag only -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -520,7 +520,7 @@ Tag only ## [4.5](coreboot-4.5-relnotes.md) Tag only -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -548,7 +548,7 @@ Tag only ## [4.4](coreboot-4.4-relnotes.md) Branch created -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ @@ -574,7 +574,7 @@ Branch created ## [4.2](coreboot-4.2-relnotes.md) Branch created -```eval_rst +```{eval-rst} +-----------------------------+------------------------+------------+----------+ | Vendor/Board | Processor | Date added | Brd type | +=============================+========================+============+==========+ diff --git a/Documentation/releases/checklist.md b/Documentation/releases/checklist.md index 2d334870db..29ebdbbbd4 100644 --- a/Documentation/releases/checklist.md +++ b/Documentation/releases/checklist.md @@ -1,4 +1,4 @@ -```eval_rst +```{eval-rst} :orphan: ``` diff --git a/Documentation/releases/coreboot-4.17-relnotes.md b/Documentation/releases/coreboot-4.17-relnotes.md index eb136f42fc..2ad45ca78c 100644 --- a/Documentation/releases/coreboot-4.17-relnotes.md +++ b/Documentation/releases/coreboot-4.17-relnotes.md @@ -12,7 +12,11 @@ work to make the coreboot project successful. Major Bugfixes in this release ------------------------------ -* [CVE-2022-29264](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29264) +```{toctree} +:maxdepth: 1 + +CVE-2022-29264 <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-29264> +``` New Mainboards diff --git a/Documentation/releases/coreboot-4.19-relnotes.md b/Documentation/releases/coreboot-4.19-relnotes.md index f0ef10d05f..09e99f6fb1 100644 --- a/Documentation/releases/coreboot-4.19-relnotes.md +++ b/Documentation/releases/coreboot-4.19-relnotes.md @@ -221,7 +221,7 @@ Significant Known and Open Issues --------------------------------- Issues from the coreboot bugtracker: https://ticket.coreboot.org/ -```eval_rst +```{eval-rst} +-----+-----------------------------------------------------------------+ | # | Subject | +=====+=================================================================+ diff --git a/Documentation/releases/coreboot-4.20.1-relnotes.md b/Documentation/releases/coreboot-4.20.1-relnotes.md index 3bfa99322c..6f41100145 100644 --- a/Documentation/releases/coreboot-4.20.1-relnotes.md +++ b/Documentation/releases/coreboot-4.20.1-relnotes.md @@ -230,7 +230,7 @@ Significant Known and Open Issues --------------------------------- Issues from the coreboot bugtracker: https://ticket.coreboot.org/ -```eval_rst +```{eval-rst} +-----+-----------------------------------------------------------------+ | # | Subject | +=====+=================================================================+ diff --git a/Documentation/releases/coreboot-4.21-relnotes.md b/Documentation/releases/coreboot-4.21-relnotes.md index 9bc1b6df71..5e493b567f 100644 --- a/Documentation/releases/coreboot-4.21-relnotes.md +++ b/Documentation/releases/coreboot-4.21-relnotes.md @@ -356,7 +356,7 @@ Significant Known and Open Issues Issues from the coreboot bugtracker: https://ticket.coreboot.org/ -```eval_rst +```{eval-rst} +-----+-----------------------------------------------------------------+ | # | Subject | +=====+=================================================================+ diff --git a/Documentation/releases/coreboot-4.22-relnotes.md b/Documentation/releases/coreboot-4.22-relnotes.md index 4cd0991ad4..a36bc81ce9 100644 --- a/Documentation/releases/coreboot-4.22-relnotes.md +++ b/Documentation/releases/coreboot-4.22-relnotes.md @@ -267,7 +267,7 @@ Issues from the coreboot bugtracker: https://ticket.coreboot.org/ ### Payload-specific issues -```eval_rst +```{eval-rst} +-----+-----------------------------------------------------------------+ | # | Subject | +=====+=================================================================+ @@ -284,7 +284,7 @@ Issues from the coreboot bugtracker: https://ticket.coreboot.org/ ### Platform-specific issues -```eval_rst +```{eval-rst} +-----+-----------------------------------------------------------------+ | # | Subject | +=====+=================================================================+ diff --git a/Documentation/releases/index.md b/Documentation/releases/index.md index 17a94625d5..da7dc46784 100644 --- a/Documentation/releases/index.md +++ b/Documentation/releases/index.md @@ -3,7 +3,11 @@ ## Upcoming release Please add to the release notes as changes are added: -* [24.05 - May 2024](coreboot-24.05-relnotes.md) +```{toctree} +:maxdepth: 1 + +24.05 - May 2024 <coreboot-24.05-relnotes.md> +``` The [checklist] contains instructions to ensure that a release covers all important things and provides a reliable format for tarballs, branch @@ -15,29 +19,33 @@ important is taken care of. ## Previous releases -* [24.02 - February 2024](coreboot-24.02-relnotes.md) -* [4.22 - November 2023](coreboot-4.22-relnotes.md) -* [4.21 - August 2023](coreboot-4.21-relnotes.md) -* [4.20.1 - May 2023](coreboot-4.20.1-relnotes.md) -* [4.19 - January 2023](coreboot-4.19-relnotes.md) -* [4.18 - October 2022](coreboot-4.18-relnotes.md) -* [4.17 - May 2022](coreboot-4.17-relnotes.md) -* [4.16 - February 2022](coreboot-4.16-relnotes.md) -* [4.15 - November 2021](coreboot-4.15-relnotes.md) -* [4.14 - May 2021](coreboot-4.14-relnotes.md) -* [4.13 - November 2020](coreboot-4.13-relnotes.md) -* [4.12 - May 2020](coreboot-4.12-relnotes.md) -* [4.11 - November 2019](coreboot-4.11-relnotes.md) -* [4.10 - July 2019](coreboot-4.10-relnotes.md) -* [4.9 - December 2018](coreboot-4.9-relnotes.md) -* [4.8.1 - May 2018](coreboot-4.8.1-relnotes.md) -* [4.7 - January 2018](coreboot-4.7-relnotes.md) -* [4.6 - April 2017](coreboot-4.6-relnotes.md) -* [4.5 - October 2016](coreboot-4.5-relnotes.md) -* [4.4 - May 2016](coreboot-4.4-relnotes.md) -* [4.3 - January 2016](coreboot-4.3-relnotes.md) -* [4.2 - October 2015](coreboot-4.2-relnotes.md) -* [4.1 - July 2015](coreboot-4.1-relnotes.md) +```{toctree} +:maxdepth: 1 + +24.02 - February 2024 <coreboot-24.02-relnotes.md> +4.22 - November 2023 <coreboot-4.22-relnotes.md> +4.21 - August 2023 <coreboot-4.21-relnotes.md> +4.20.1 - May 2023 <coreboot-4.20.1-relnotes.md> +4.19 - January 2023 <coreboot-4.19-relnotes.md> +4.18 - October 2022 <coreboot-4.18-relnotes.md> +4.17 - May 2022 <coreboot-4.17-relnotes.md> +4.16 - February 2022 <coreboot-4.16-relnotes.md> +4.15 - November 2021 <coreboot-4.15-relnotes.md> +4.14 - May 2021 <coreboot-4.14-relnotes.md> +4.13 - November 2020 <coreboot-4.13-relnotes.md> +4.12 - May 2020 <coreboot-4.12-relnotes.md> +4.11 - November 2019 <coreboot-4.11-relnotes.md> +4.10 - July 2019 <coreboot-4.10-relnotes.md> +4.9 - December 2018 <coreboot-4.9-relnotes.md> +4.8.1 - May 2018 <coreboot-4.8.1-relnotes.md> +4.7 - January 2018 <coreboot-4.7-relnotes.md> +4.6 - April 2017 <coreboot-4.6-relnotes.md> +4.5 - October 2016 <coreboot-4.5-relnotes.md> +4.4 - May 2016 <coreboot-4.4-relnotes.md> +4.3 - January 2016 <coreboot-4.3-relnotes.md> +4.2 - October 2015 <coreboot-4.2-relnotes.md> +4.1 - July 2015 <coreboot-4.1-relnotes.md> +``` [checklist]: checklist.md diff --git a/Documentation/releases/templates.md b/Documentation/releases/templates.md index adc9d6687e..897f1add94 100644 --- a/Documentation/releases/templates.md +++ b/Documentation/releases/templates.md @@ -1,4 +1,4 @@ -```eval_rst +```{eval-rst} :orphan: ``` |