Skip to content

Commit 02d6c1d

Browse files
committed
Document how to add external documentation for administrators of documentation
1 parent 9af23e4 commit 02d6c1d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/contributing/admins.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,42 @@ This guide is for administrators of Plone Documentation.
1515
It covers automated deployments, hosting, automated testing, previewing, and importing external package documentation into Plone Documentation.
1616

1717

18+
(administrators-import-docs-submodule-label)=
19+
20+
## Importing external docs and converting to MyST
21+
22+
This section describes how to import external projects and convert their docs to MyST.
23+
We did this for `plone.app.dexterity` and several other projects.
24+
25+
1. Create a new branch using the name of the project.
26+
1. Install [rst-to-myst](https://pypi.org/project/rst-to-myst/).
27+
28+
```shell
29+
bin/pip install "rst-to-myst[sphinx]"
30+
```
31+
32+
1. Clone the project repository to the root of `plone/documentation`.
33+
1. Delete any non-documentation files from the clone.
34+
1. Move the documentation files and subfolders to the root of the clone, retaining the documentation structure.
35+
1. Convert the reStructuredText documentation files to MyST.
36+
The example commands below assume that there are files at the root of the clone and in one sub-level of nested directories. For deeper nesting, insert globbing syntax for each sub-level as `**/`
37+
38+
```shell
39+
bin/rst2myst convert -R project/*.rst
40+
bin/rst2myst convert -R project/**/*.rst
41+
```
42+
43+
1. Add HTML meta data to the converted files.
44+
45+
```shell
46+
cd project
47+
../bin/python ../docs/addMetaData.py
48+
```
49+
50+
1. Optionally clean up any MyST syntax.
51+
1. Commit and push your branch to GitHub and create a pull request.
52+
53+
1854
(administrators-import-docs-submodule-label)=
1955

2056
## Importing external docs with submodules

0 commit comments

Comments
 (0)