|
4 | 4 | "description": "Administrators' guide to writing Plone Documentation. It covers automated deployments, hosting, automated testing, previewing, and importing external package documentation into Plone Documentation."
|
5 | 5 | "property=og:description": "Administrators' guide to writing Plone Documentation. It covers automated deployments, hosting, automated testing, previewing, and importing external package documentation into Plone Documentation."
|
6 | 6 | "property=og:title": "Administrators Guide"
|
7 |
| - "keywords": "Plone, Documentation, automated deployments, hosting, automated testing, importing external packages" |
| 7 | + "keywords": "Plone, Documentation, automated deployments, hosting, automated testing, importing external packages, preview, build, pull request" |
8 | 8 | ---
|
9 | 9 |
|
10 | 10 | (administrators-guide-label)=
|
@@ -84,6 +84,54 @@ To make it easier for other contributors to work with your project, update the f
|
84 | 84 | Commit and push your changes to a remote, and submit a pull request against [ `plone/[email protected]`](https://github.com/plone/documentation/compare).
|
85 | 85 |
|
86 | 86 |
|
| 87 | +## Add a project to Read the Docs |
| 88 | + |
| 89 | +To add a new site to Read the Docs to preview documentation or storybooks in pull requests, you need to configure your project's repository and import it into Read the Docs. |
| 90 | +You also need an account on Read the Docs and have write access to the repository. |
| 91 | +
|
| 92 | +
|
| 93 | +### Configuration files |
| 94 | +
|
| 95 | +The following are example files that you can use to configure your project for Read the Docs pull request previews. |
| 96 | +
|
| 97 | +- [Plone Sphinx Theme `Makefile`](https://github.com/plone/plone-sphinx-theme/blob/main/Makefile), specifically the `rtd-pr-preview` section. |
| 98 | + This is the command to use to build documentation previews on Read the Docs. |
| 99 | +- [Plone Sphinx Theme `requirements-initial.txt`](https://github.com/plone/plone-sphinx-theme/blob/main/requirements-initial.txt) specifies the initial Python packaging tool requirements to set up a virtual environment. |
| 100 | +- [Plone Sphinx Theme `requirements-docs.txt`](https://github.com/plone/plone-sphinx-theme/blob/main/requirements-docs.txt) specifies the requirements to use Plone Sphinx Theme and build the docs. |
| 101 | +- [Plone Sphinx Theme `.readthedocs.yaml`](https://github.com/plone/plone-sphinx-theme/blob/main/readthedocs.yaml) specifies the configuration and command to build the docs. |
| 102 | +- [Plone Sphinx Theme `.github/workflows/rtd-pr-preview.yml`](https://github.com/plone/plone-sphinx-theme/blob/main/.github/workflows/rtd-pr-preview.yml) specifies when to build the docs, specifically only when a pull request is opened against the `main` branch and there are changes to documentation files. |
| 103 | + You might need to adjust the branch name, paths, and files to check for changes. |
| 104 | +
|
| 105 | +
|
| 106 | +### Read the Docs administration |
| 107 | +
|
| 108 | +After logging in to your Read the Docs account, you can import your project. |
| 109 | +
|
| 110 | +1. Click {guilabel}`Add project`. |
| 111 | +1. For {guilabel}`Repository name`, enter the GitHub organization, a forward slash, and the repository to import, for example, `plone/volto`. |
| 112 | +1. Click {guilabel}`Continue`. |
| 113 | +1. In the {guilabel}`Add project` screen, you can configure basic project settings, including its {guilabel}`Name`, {guilabel}`Repository URL`, {guilabel}`Default branch`, and {guilabel}`Language`. |
| 114 | + The defaults are usually accurate. |
| 115 | +1. Click {guilabel}`Next`. |
| 116 | +1. A sample `.readthedocs.yaml` file is suggested, if you have not already added one. |
| 117 | +1. Click {guilabel}`Finish`. |
| 118 | + Read the Docs will redirect you to the project details, and start building the docs. |
| 119 | +
|
| 120 | +Plone uses an organization on Read the Docs. |
| 121 | +The main project is Plone Documentation. |
| 122 | +All other Plone projects with documentation should be configured as subprojects. |
| 123 | +
|
| 124 | +```{todo} |
| 125 | +Add how to set up a subproject. |
| 126 | +``` |
| 127 | +
|
| 128 | +For most Plone projects, you will not want to Read the Docs to publish the `latest` or other specific versions. |
| 129 | +Plone projects currently self-host their official documentation. |
| 130 | +
|
| 131 | +1. For the version that you want to deactivate, click its {guilabel}`…` icon, and select {guilabel}`Configure version`. |
| 132 | +1. Toggle the {guilabel}`Active` option off, and click {guilabel}`Update version`. |
| 133 | +
|
| 134 | +
|
87 | 135 | ## Add a project to Netlify
|
88 | 136 |
|
89 | 137 | To add a new site to Netlify to preview built documentation or storybooks, you need to add a new site to Netlify.
|
|
0 commit comments