Skip to content

API packages in docs/api #1857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
/styles/Microsoft

# symlinked from submodule
docs/plone.api
docs/plone.restapi
docs/api/plone.api
docs/api/plone.restapi
docs/api/registry
docs/volto

# editor files
Expand Down
24 changes: 16 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,37 @@ venv/bin/python: ## Setup up Python virtual environment and install requirement
@echo
@echo "Installation of requirements completed."

docs/plone.api: ## Setup plone.api docs
docs/api/plone.api: ## Setup plone.api docs
git submodule init
git submodule update
venv/bin/pip install -e submodules/plone.api/"[test]"
ln -s ../submodules/plone.api/docs ./docs/plone.api
ln -sfn ../../submodules/plone.api/docs ./docs/api/plone.api
@echo
@echo "Documentation of plone.api initialized."

docs/plone.restapi: ## Setup plone.restapi docs
docs/api/plone.restapi: ## Setup plone.restapi docs
git submodule init
git submodule update
ln -s ../submodules/plone.restapi ./docs/plone.restapi
ln -sfn ../../submodules/plone.restapi ./docs/api/plone.restapi
@echo
@echo "Documentation of plone.restapi initialized."

docs/volto: ## Setup Volto docs
git submodule init
git submodule update
ln -s ../submodules/volto/docs/source ./docs/volto
ln -sfn ../submodules/volto/docs/source ./docs/volto
@echo
@echo "Documentation of volto initialized."

docs/api/plone-registry: ## Setup @plone/registry docs
git submodule init
git submodule update
ln -sfn ../../submodules/volto/packages/registry/docs ./docs/api/registry
@echo
@echo "Documentation of @plone/registry initialized."

.PHONY: deps
deps: venv/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.
deps: venv/bin/python docs/volto docs/api/plone.restapi docs/api/plone.api docs/api/plone-registry ## 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.


.PHONY: html
Expand Down Expand Up @@ -209,8 +216,9 @@ livehtml: deps ## Rebuild Sphinx documentation on changes, with live-reload in
--ignore "*.swp" \
--port 8050 \
--watch volto \
--watch plone.api \
--watch plone.restapi \
--watch api/plone.api \
--watch api/plone.restapi \
--watch api/registry \
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)

.PHONY: rtd-pr-preview
Expand Down
Empty file added docs/api/.gitkeep
Empty file.
18 changes: 10 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@
"attributes": {
"target": "_blank",
"rel": "noopener me",
"class": "nav-link custom-fancy-css"
}
"class": "nav-link custom-fancy-css",
},
},
{
"name": "Mastodon",
Expand All @@ -214,8 +214,8 @@
"attributes": {
"target": "_blank",
"rel": "noopener me",
"class": "nav-link custom-fancy-css"
}
"class": "nav-link custom-fancy-css",
},
},
{
"name": "YouTube",
Expand All @@ -225,8 +225,8 @@
"attributes": {
"target": "_blank",
"rel": "noopener me",
"class": "nav-link custom-fancy-css"
}
"class": "nav-link custom-fancy-css",
},
},
{
"name": "X (formerly Twitter)",
Expand All @@ -236,8 +236,8 @@
"attributes": {
"target": "_blank",
"rel": "noopener me",
"class": "nav-link custom-fancy-css"
}
"class": "nav-link custom-fancy-css",
},
},
],
"logo": {
Expand Down Expand Up @@ -436,6 +436,7 @@

# -- Configuration for source_replacements extension -----------------------


# An extension that allows replacements for code blocks that
# are not supported in `rst_epilog` or other substitutions.
# https://stackoverflow.com/a/56328457/2214933
Expand All @@ -451,6 +452,7 @@ def source_replace(app, docname, source):
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
}


# Finally, configure app attributes.
def setup(app):
app.add_config_value("source_replacements", {}, True)
Expand Down
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ contributing/index
% plone.restapi/docs/source/index
% backend/index

```{toctree}
:caption: API
:maxdepth: 2
:hidden:

api/registry/index
api/plone.restapi/docs/source/index
```

```{toctree}
:caption: Appendices
Expand Down
Loading