Skip to content

Commit 9fb1255

Browse files
authored
Merge pull request plone#1193 from plone/import-restapi
Import plone.restapi docs
2 parents 3a6ee60 + 5f93f55 commit 9fb1255

File tree

9 files changed

+85
-28
lines changed

9 files changed

+85
-28
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ pyvenv.cfg
1010

1111
# symlinked from submodule
1212
docs/volto
13+
docs/plone.restapi

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
path = submodules/volto
33
url = https://github.com/plone/volto.git
44
branch = master
5+
[submodule "submodules/plone.restapi"]
6+
path = submodules/plone.restapi
7+
url = https://github.com/plone/plone.restapi.git
8+
branch = plone6docs

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,13 @@ docs/volto:
4343
git submodule update; \
4444
ln -s ../submodules/volto/docs/source ./docs/volto
4545

46+
docs/restapi:
47+
git submodule init; \
48+
git submodule update; \
49+
ln -s "../submodules/plone.restapi" "./docs/plone.restapi"
50+
4651
.PHONY: deps
47-
deps: bin/python docs/volto ## Create Python virtual environment, install requirements, pull in Volto submodule
52+
deps: bin/python docs/volto docs/restapi ## Create Python virtual environment, install requirements, initialize or update the volto and plone.restapi submodules, and finally create symlinks to the documentation source.
4853

4954
.PHONY: html
5055
html: deps ## Build html
@@ -210,6 +215,7 @@ netlify:
210215
git submodule init; \
211216
git submodule update; \
212217
ln -s ../submodules/volto/docs/source ./docs/volto
218+
ln -s "../submodules/plone.restapi" "./docs/plone.restapi"
213219
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
214220
make storybook
215221

docs/conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
"sphinx.ext.todo",
4949
"sphinx_copybutton",
5050
"sphinx_sitemap",
51+
"sphinxcontrib.httpdomain",
52+
"sphinxcontrib.httpexample",
5153
"sphinxcontrib.spelling",
5254
"sphinxext.opengraph",
5355
]
@@ -67,7 +69,6 @@
6769
# Options for the linkcheck builder
6870
# Ignore localhost
6971
linkcheck_ignore = [
70-
# TODO: Before release, clean up any links to ignore
7172
r"http://localhost",
7273
r"http://0.0.0.0",
7374
r"http://127.0.0.1",
@@ -80,6 +81,8 @@
8081
r"https://github.com/plone/plone.rest#cors",
8182
r"https://github.com/plone/plone.volto/blob/6f5382c74f668935527e962490b81cb72bf3bc94/src/kitconcept/volto/upgrades.py#L6-L54",
8283
r"https://github.com/tc39/proposals/blob/HEAD/finished-proposals.md#finished-proposals",
84+
r"https://coveralls.io/repos/github/plone/plone.restapi/badge.svg\?branch=master", # plone.restapi
85+
r"https://github.com/plone/plone.restapi/blob/dde57b88e0f1b5f5e9f04e6a21865bc0dde55b1c/src/plone/restapi/services/content/add.py#L35-L61", # plone.restapi
8386
]
8487
linkcheck_anchors = True
8588
linkcheck_timeout = 10
@@ -92,6 +95,7 @@
9295
# The suffix of source filenames.
9396
source_suffix = {
9497
".md": "markdown",
98+
".rst": "restructuredtext",
9599
}
96100

97101
# The master toctree document.
@@ -103,7 +107,17 @@
103107
exclude_patterns = [
104108
"spelling_wordlist.txt",
105109
"**/CHANGES.rst",
110+
"**/CONTRIBUTORS.rst",
106111
"**/LICENSE.rst",
112+
"**/README.rst",
113+
"plone.restapi/.*",
114+
"plone.restapi/bin",
115+
"plone.restapi/docs/source/ideas",
116+
"plone.restapi/include",
117+
"plone.restapi/lib",
118+
"plone.restapi/news",
119+
"plone.restapi/performance",
120+
"plone.restapi/src",
107121
]
108122

109123
html_extra_path = [

docs/contributing/admins.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,19 @@ Inside the repository `plone/documentation`, add a git submodule that points to
2828
git submodule add [email protected]:plone/my_package.git submodules/my_package
2929
```
3030

31+
Add a target `docs/my_package` in `Makefile`, then add `docs/my_package` to the `deps` target, following `volto` as a pattern.
32+
You might need to adjust the paths to your package's documentation after it is cloned.
33+
34+
To complete setup, generate a symlink to your project's docs, and build the docs, use a single command.
35+
36+
```shell
37+
make html
38+
```
39+
3140
To make it easier for other contributors to work with your project, update the following files, using `volto` as a model.
3241

33-
- `Makefile` targets `docs/my_package` and `deps`
34-
- The documentation section {ref}`contributing-editing-volto-documentation-label`
42+
- Add it to the documentation section {ref}`contributing-editing-external-package-documentation-label`.
43+
- Add the symlink `docs/my_package` to `.gitignore`.
44+
- Optionally set a branch to work on in `.gitmodules`.
3545

3646
Commit and push your changes to a remote, and submit a pull request against [`plone/documentation@6-dev`](https://github.com/plone/documentation/compare).

docs/contributing/index.md

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ See {doc}`setup-build` for instructions for how to set up and build the document
6363
Contributions are managed through git repositories on GitHub.
6464

6565
- [documentation](https://github.com/plone/documentation)
66+
- [plone.restapi](https://github.com/plone/plone.restapi)
6667
- [volto](https://github.com/plone/volto)
6768

6869
First discuss whether you should perform any work.
6970
Any method below is acceptable, but are listed in order of most likely to get a response.
7071

71-
- Search for open issues in [`documentation`](https://github.com/plone/documentation/issues) or [`volto`](https://github.com/plone/volto/issues) and comment on them.
72-
- Create a new issue in [`documentation`](https://github.com/plone/documentation/issues) or [`volto`](https://github.com/plone/volto/issues).
72+
- Search for open issues in [`documentation`](https://github.com/plone/documentation/issues), [`plone.restapi`](https://github.com/plone/plone.restapi/issues), or [`volto`](https://github.com/plone/volto/issues) and comment on them.
73+
- Create a new issue in [`documentation`](https://github.com/plone/documentation/issues), [`plone.restapi`](https://github.com/plone/plone.restapi/issues), or [`volto`](https://github.com/plone/volto/issues).
7374
- Discuss during conferences, trainings, and other Plone events.
7475
- Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13).
7576
- Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj).
@@ -110,14 +111,14 @@ Quick edits for minor issues, such as typographical errors, misspellings, and En
110111
For large edits, first follow the instructions in {doc}`setup-build`.
111112
112113
Once you have your environment set up, then you can follow the standard practice for making a pull request.
113-
This practice differs depending on whether you are making contributions to only the core `documentation` files or `volto` files as well.
114+
This practice differs depending on whether you are making contributions to only the core `documentation` files, or `plone.restapi` and `volto` files as well.
114115
115116
116117
(contributing-documentation-only-label)=
117118
118119
### Working with only the `plone/documentation` repository
119120
120-
This section describes how to make contributions to files in the `plone/documentation` repository only, and excludes `plone/volto/docs` files.
121+
This section describes how to make contributions to files in the `plone/documentation` repository only, and excludes files in `submodules/plone.restapi/docs` and `submodules/volto/docs`.
121122
122123
1. From the project root directory, sync your local `6-dev` branch with its remote.
123124
You might need to resolve conflicts.
@@ -170,16 +171,16 @@ This section describes how to make contributions to files in the `plone/document
170171
1. Members who subscribe to the repository will receive a notification and review your request.
171172
172173
173-
(contributing-editing-volto-documentation-label)=
174+
(contributing-editing-external-package-documentation-label)=
174175
175-
### Editing Volto documentation
176+
### Editing external package documentation
176177
177-
If you want to edit the Volto documentation — the files within the `docs/volto` subdirectory — the process is slightly different.
178+
If you want to edit documentation of imported external packages, the process is slightly different.
178179
We use git submodules to manage multiple repositories.
179-
We imported the `plone/volto` repository into the `plone/documentation` repository as described in {doc}`setup-build`.
180+
We imported the external repositories the `plone/documentation` repository as described in {doc}`setup-build`.
180181
181182
```{important}
182-
We currently use the branches `plone/documentation@6-dev` and `plone/volto@master` as the main branches for developing Plone 6 Documentation.
183+
We currently use the branches `plone/documentation@6-dev`, `plone/plone.restapi@plone6docs`, and `plone/volto@master` as the main branches for developing Plone 6 Documentation.
183184
These branches may change as we get closer to a production release.
184185
```
185186

@@ -191,40 +192,48 @@ These branches may change as we get closer to a production release.
191192
git pull
192193
```
193194

194-
1. Change your working directory from the project root directory to `submodules/volto`.
195+
1. Change your working directory to the imported package's directory under `submodules/`.
195196
196197
```shell
198+
# choose one
199+
cd submodules/plone.restapi
197200
cd submodules/volto
198201
```
199202
200-
1. Update the submodule, and sync your local `master` branch with its remote.
203+
1. Update the submodule, and sync your local development branch with its remote.
201204
You might need to resolve conflicts.
202205
203206
```shell
204207
git submodule update
208+
209+
# For plone.restapi
210+
git checkout plone6docs
211+
212+
# For volto
205213
git checkout master
214+
206215
git pull
207216
```
208217
209-
1. Create a new branch from `volto/master`.
218+
1. Create a new branch from the development branch.
210219
211220
```shell
212221
git checkout -b <new_branch>
213222
```
214223
215-
1. Make edits to files in `docs/volto` using your favorite editor, and save, preview, and test.
224+
1. Make edits to files in `docs/<external_package>` using your favorite editor, and save, preview, and test.
216225
You must run and pass the builds `html` and `linkcheck` without causing new errors.
217226
218227
```shell
219-
# Optionally clean the builds to avoid cache issues
220-
# Note that for the Volto docs only, we use "docs-" as a prefix for make targets
221-
# because it has so many of them and to avoid a conflict with the core application.
228+
# Optionally clean the builds to avoid cache issues.
229+
# Note that for the external packages' documentation only,
230+
# we use "docs-" as a prefix for make targets to avoid a conflicts.
222231
make docs-clean
223232
make docs-html
224233
make docs-linkcheck
225234
```
226235

227-
1. Back in `submodules/volto`, commit and push your changes to the remote.
236+
1. Back in `submodules/<external_package>`, commit and push your changes to the remote.
228237

229238
```shell
230239
git add <files>
@@ -236,13 +245,20 @@ These branches may change as we get closer to a production release.
236245

237246
```shell
238247
cd ../..
248+
249+
# For plone.restapi
250+
git add submodules/plone.restapi
251+
git commit -m "Update submodules/plone.restapi tip"
252+
253+
# For volto
239254
git add submodules/volto
240255
git commit -m "Update submodules/volto tip"
256+
241257
git push
242258
```
243259

244-
1. Visit the GitHub `plone/volto` repository, and [create a pull request](https://github.com/plone/volto/compare) against the branch `master`.
245-
1. Members who subscribe to the `plone/volto` repository will receive a notification and review your request.
260+
1. Visit the GitHub `plone/<external_package>` repository, and create a pull request against the development branch.
261+
1. Members who subscribe to the `plone/<external_package>` repository will receive a notification and review your request.
246262

247263

248264
(contributing-code-of-conduct-label)=

docs/index.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
---
22
html_meta:
3-
"description": ""
4-
"property=og:description": ""
5-
"property=og:title": ""
6-
"keywords": ""
3+
"description": "This website is the HTML documentation of Plone, an open source, enterprise-level content management system."
4+
"property=og:description": "This website is the HTML documentation of Plone, an open source, enterprise-level content management system."
5+
"property=og:title": "Plone 6 Documentation"
6+
"keywords": "Plone 6, content management system, CMS, open source, Documentation, Volto, Classic UI, frontend, backend, plone.restapi, plone.api"
77
---
88

99
(index-label)=
1010

1111
# Plone 6 Documentation
1212

13+
This website is the HTML documentation of Plone, an open source, enterprise-level content management system.
14+
1315
```{toctree}
1416
:maxdepth: 2
1517
:hidden: true
1618
1719
backend/index
1820
volto/index
1921
classic-ui/index
22+
plone.restapi/docs/source/index
2023
contributing/index
2124
```
2225

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
docutils<0.17,>=0.15 # sphinx-book-theme 0.2.0 has requirement docutils<0.17,>=0.15
22
Sphinx
3-
jsx-lexer
3+
jsx-lexer # volto
44
lesscpy
55
linkify-it-py
66
myst-parser
@@ -9,5 +9,7 @@ sphinx-book-theme
99
sphinx-copybutton
1010
sphinx-sitemap
1111
sphinx-togglebutton
12+
sphinxcontrib.httpdomain # plone.restapi
13+
sphinxcontrib.httpexample # plone.restapi
1214
sphinxcontrib-spelling
1315
sphinxext-opengraph

submodules/plone.restapi

Submodule plone.restapi added at fac1832

0 commit comments

Comments
 (0)