Skip to content

Commit c2bc221

Browse files
committed
Merge branch '6-dev' of github.com:plone/documentation into 6-dev
2 parents d55475c + 98180d5 commit c2bc221

File tree

13 files changed

+92
-32
lines changed

13 files changed

+92
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ pyvenv.cfg
1111
# symlinked from submodule
1212
docs/volto
1313
docs/plone.restapi
14+
docs/plone.api

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
path = submodules/plone.restapi
77
url = https://github.com/plone/plone.restapi.git
88
branch = master
9+
[submodule "submodules/plone.api"]
10+
path = submodules/plone.api
11+
url = https://github.com/plone/plone.api.git
12+
branch = integration-in-plone-docs-6

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,33 @@ distclean: ## Clean docs build directory and Python virtual environment
3333
cd $(DOCS_DIR) && rm -rf $(BUILDDIR)/
3434
rm -rf ./bin/ ./lib/ ./lib64 ./include ./pyvenv.cfg
3535

36+
3637
bin/python:
3738
python3 -m venv . || virtualenv --clear --python=python3 .
3839
bin/python -m pip install --upgrade pip
3940
bin/pip install -r requirements.txt
4041

41-
docs/volto:
42+
docs/plone.api:
4243
git submodule init; \
4344
git submodule update; \
44-
ln -s ../submodules/volto/docs/source ./docs/volto
45+
bin/pip install -e submodules/plone.api[test]; \
46+
ln -s ../submodules/plone.api/docs ./docs/plone.api
47+
@echo
48+
@echo "Documentation of plone.api initialized."
49+
50+
docs/plone.restapi:
51+
git submodule init; \
52+
git submodule update; \
53+
ln -s ../submodules/plone.restapi ./docs/plone.restapi
4554

46-
docs/restapi:
55+
docs/volto:
4756
git submodule init; \
4857
git submodule update; \
49-
ln -s "../submodules/plone.restapi" "./docs/plone.restapi"
58+
ln -s ../submodules/volto/docs/source ./docs/volto
5059

5160
.PHONY: deps
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.
61+
deps: bin/python docs/volto docs/plone.restapi docs/plone.api ## Create Python virtual environment, install requirements, initialize or update the volto, plone.restapi, and plone.api submodules, and finally create symlinks to the source files.
62+
5363

5464
.PHONY: html
5565
html: deps ## Build html
@@ -212,10 +222,13 @@ livehtml: deps ## Rebuild Sphinx documentation on changes, with live-reload in
212222
.PHONY: netlify
213223
netlify:
214224
pip install -r requirements.txt
225+
pip install -r requirements-netlify.txt
215226
git submodule init; \
216227
git submodule update; \
228+
pip install -e submodules/plone.api[test]; \
217229
ln -s ../submodules/volto/docs/source ./docs/volto
218-
ln -s "../submodules/plone.restapi" "./docs/plone.restapi"
230+
ln -s ../submodules/plone.restapi ./docs/plone.restapi
231+
ln -s ../submodules/plone.api/docs ./docs/plone.api
219232
cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
220233
make storybook
221234

docs/_static/custom.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
--pst-icon-clipboard-list: '\f46d';
44
--pst-icon-admonition-todo: var(--pst-icon-clipboard-list);
55
--pst-color-admonition-todo: 161 , 46, 233;
6+
--target-color: #b9ee9e;
7+
--codeblock-color: #aad993;
68
}
79

810
.visuallyhidden {
@@ -54,7 +56,7 @@ p.ploneorglink img {
5456
dt:target,
5557
span.highlighted,
5658
ul.search li span.highlighted {
57-
background-color: #7ddf4493;
59+
background-color: var(--target-color);
5860
}
5961

6062
.bd-sidebar .nav ul {
@@ -125,6 +127,9 @@ div.admonition.admonition-todo > .admonition-title::before {
125127
color: rgba(var(--pst-color-admonition-todo),1);
126128
content: var(--pst-icon-admonition-todo);
127129
}
130+
.admonition-github-only.admonition {
131+
display: none;
132+
}
128133

129134

130135
.topic {
@@ -299,3 +304,31 @@ span.guilabel, span.menuselection {
299304
font-style: italic;
300305
white-space: nowrap;
301306
}
307+
308+
309+
/*
310+
* extensions
311+
*/
312+
313+
/* definitions */
314+
dl.py.function {
315+
margin-bottom: 5rem;
316+
}
317+
dl.py.function > dt {
318+
background-color: var(--codeblock-color);
319+
padding: 4px 5px;
320+
}
321+
dl.py.function > dt:target {
322+
background-color: var(--target-color);
323+
}
324+
dl.field-list > dt {
325+
padding-left: 0;
326+
}
327+
328+
/* code blocks */
329+
div.viewcode-block:target {
330+
padding: 10px 10px;
331+
background-color: var(--codeblock-color);
332+
border-top: 1px solid var(--codeblock-color);
333+
border-bottom: 1px solid var(--codeblock-color);
334+
}

docs/_static/searchtools.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,12 @@ var Search = {
254254

255255
function _getBreadcrumbs(item, linkUrl) {
256256
let parentTitles = item[6];
257+
let ploneApiTitles = [
258+
"A Plone API",
259+
"List of all API methods with descriptions"
260+
];
261+
// ugly hack for plone.api documentation integrated via git submodule
262+
parentTitles = Array.isArray(parentTitles) ? parentTitles : ploneApiTitles;
257263
let path = item[0].split('/')
258264
.slice(0, -1);
259265
path = path.map((el, index) => {

docs/_templates/search.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
7878
{% for id, title in
7979
[
8080
["backend","Backend"],
81+
["plone.api","plone.api"],
8182
["classic-ui","Classic UI"],
8283
["volto","Frontend"],
8384
["contributing","Contributing"],

docs/backend/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ security
2626
workflows
2727
search
2828
zodb
29-
plone-api
29+
../plone.api/index.rst
3030
plone-restapi
3131
sending-email
3232
upgrading/index

docs/backend/plone-api.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
"sphinxcontrib.httpexample",
5353
"sphinxcontrib.spelling",
5454
"sphinxext.opengraph",
55+
# plone.api
56+
'sphinx.ext.viewcode',
57+
'sphinx.ext.autosummary',
5558
]
5659

5760

docs/contributing/index.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,15 @@ 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.api](https://github.com/plone/plone.api)
6667
- [plone.restapi](https://github.com/plone/plone.restapi)
6768
- [volto](https://github.com/plone/volto)
6869

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

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).
73+
- Search for open issues in [`documentation`](https://github.com/plone/documentation/issues), [`plone.api`](https://github.com/plone/plone.api/issues), [`plone.restapi`](https://github.com/plone/plone.restapi/issues), or [`volto`](https://github.com/plone/volto/issues) and comment on them.
74+
- Create a new issue in [`documentation`](https://github.com/plone/documentation/issues), [`plone.api`](https://github.com/plone/plone.api/issues), [`plone.restapi`](https://github.com/plone/plone.restapi/issues), or [`volto`](https://github.com/plone/volto/issues).
7475
- Discuss during conferences, trainings, and other Plone events.
7576
- Ask on the [Plone Community Forum, Documentation topic](https://community.plone.org/c/documentation/13).
7677
- Ask in the [Plone chat on Discord](https://discord.com/invite/zFY3EBbjaj).
@@ -111,14 +112,14 @@ Quick edits for minor issues, such as typographical errors, misspellings, and En
111112
For large edits, first follow the instructions in {doc}`setup-build`.
112113
113114
Once you have your environment set up, then you can follow the standard practice for making a pull request.
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.
115+
This practice differs depending on whether you are making contributions to only the core `documentation` files, or `plone.api`, `plone.restapi` and `volto` files as well.
115116
116117
117118
(contributing-documentation-only-label)=
118119
119120
### Working with only the `plone/documentation` repository
120121
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`.
122+
This section describes how to make contributions to files in the `plone/documentation` repository only, and excludes files in `submodules/plone.api/docs`, `submodules/plone.restapi/docs` and `submodules/volto/docs`.
122123
123124
1. From the project root directory, sync your local `6-dev` branch with its remote.
124125
You might need to resolve conflicts.
@@ -176,11 +177,11 @@ This section describes how to make contributions to files in the `plone/document
176177
### Editing external package documentation
177178
178179
If you want to edit documentation of imported external packages, the process is slightly different.
179-
We use git submodules to manage multiple repositories.
180+
We use `git submodules` to manage multiple repositories.
180181
We imported the external repositories the `plone/documentation` repository as described in {doc}`setup-build`.
181182
182183
```{important}
183-
We currently use the branches `plone/documentation@6-dev`, `plone/plone.restapi@master`, and `plone/volto@master` as the main branches for developing Plone 6 Documentation.
184+
We currently use the branches `plone/documentation@6-dev`, `plone/plone.api@integration-in-plone-docs-6`, `plone/plone.restapi@master`, and `plone/volto@master` as the main branches for developing Plone 6 Documentation.
184185
These branches may change as we get closer to a production release.
185186
```
186187

@@ -195,7 +196,8 @@ These branches may change as we get closer to a production release.
195196
1. Change your working directory to the imported package's directory under `submodules/`.
196197
197198
```shell
198-
# choose one
199+
# Choose one.
200+
cd submodules/plone.api
199201
cd submodules/plone.restapi
200202
cd submodules/volto
201203
```
@@ -206,10 +208,13 @@ These branches may change as we get closer to a production release.
206208
```shell
207209
git submodule update
208210
209-
# For plone.restapi
211+
# for plone.api
212+
git checkout integration-in-plone-docs-6
213+
214+
# for plone.restapi
210215
git checkout master
211216
212-
# For volto
217+
# for volto
213218
git checkout master
214219
215220
git pull
@@ -246,11 +251,15 @@ These branches may change as we get closer to a production release.
246251
```shell
247252
cd ../..
248253
249-
# For plone.restapi
254+
# for plone.api
255+
git add submodules/plone.api
256+
git commit -m "Update submodules/plone.api tip"
257+
258+
# for plone.restapi
250259
git add submodules/plone.restapi
251260
git commit -m "Update submodules/plone.restapi tip"
252261
253-
# For volto
262+
# for Volto
254263
git add submodules/volto
255264
git commit -m "Update submodules/volto tip"
256265

0 commit comments

Comments
 (0)