Skip to content

Commit

Permalink
Merge pull request #546 from plone/rtd-preview
Browse files Browse the repository at this point in the history
Remove Netlify stuff, follow up to #545
  • Loading branch information
stevepiercy authored Jan 8, 2025
2 parents ae38e69 + c92b7c8 commit dbb5595
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 24 deletions.
34 changes: 31 additions & 3 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ codespell_extra_lines = """

[pyproject]
check_manifest_ignores = """
".editorconfig",
# From `.meta.toml`, pyproject.check_manifest_ignores.
"*.cfg",
".editorconfig",
".readthedocs.yaml",
"constraints_plone52.txt",
"constraints_plone60.txt",
"constraints.txt",
"fix-converted-myst.py",
"Makefile",
"netlify.toml",
"requirements-docs.txt",
"requirements.txt",
"""
Expand Down Expand Up @@ -77,7 +78,7 @@ allowlist_externals =
echo
[testenv:plone6docs]
# New docs with sphinx-book-theme
# New docs with plone-sphinx-theme
# See [testenv:docs] for classic documentation
basepython = python3.11
skip_install = False
Expand All @@ -93,6 +94,18 @@ commands =
mkdir -p {toxinidir}/_build/plone6docs
sphinx-build -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html
[testenv:rtd-preview]
# Build docs on Read the Docs to preview pull requests using plone-sphinx-theme
basepython = python3.11
skip_install = False
extras =
tests
deps =
-r requirements-docs.txt
commands =
python -VV
sphinx-build -b html -d "{env:READTHEDOCS_OUTPUT}"/doctrees/ docs "{env:READTHEDOCS_OUTPUT}"/html/
[testenv:docs]
basepython = python3.9
skip_install = False
Expand Down Expand Up @@ -127,6 +140,21 @@ commands =
python -VV
mkdir -p {toxinidir}/_build/plone6docs
sphinx-build -b linkcheck -d _build/plone6docs/doctrees docs _build/plone6docs/linkcheck
[testenv:livehtml]
basepython = python3.11
skip_install = False
package = editable
allowlist_externals =
mkdir
extras =
{[testenv:plone6docs]extras}
deps =
{[testenv:plone6docs]deps}
commands =
python -VV
mkdir -p {toxinidir}/_build/plone6docs
sphinx-autobuild -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html
"""

[github]
Expand Down
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx_copybutton",
]
master_doc = "index"

Expand Down Expand Up @@ -82,7 +83,7 @@ def __getattr__(cls, name):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
html_theme = "plone_sphinx_theme"


# -- Intersphinx configuration ----------------------------------
Expand Down
6 changes: 6 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ Alternatively, you can automatically reload changes to the documentation as you
tox -e livehtml
```

You can run a link checker on documentation.

```shell
tox -e linkcheck
```

The [`plone.api` documentation](https://6.docs.plone.org/plone.api) is automatically generated from the documentation source files when its submodule is updated in the [main Plone `documentation` repository](https://github.com/plone/documentation/).

## Add a function to an existing module
Expand Down
5 changes: 0 additions & 5 deletions netlify.toml

This file was deleted.

6 changes: 6 additions & 0 deletions news/546.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Remove Netlify stuff, follow up to #545. @stevepiercy
- Sort and remove duplicate entries in `pyproject.toml`
- Remove unused docs requirements.
- Fix comments and remove unnecessary steps from `tox.ini`.
- Enable copy button for code blocks.
- Add linkcheck to documentation of documentation.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ ignore = [
"dependabot.yml",
"mx.ini",
"tox.ini",
".editorconfig",
"*.cfg",
".editorconfig",
".readthedocs.yaml",
"constraints_plone52.txt",
"constraints_plone60.txt",
"constraints.txt",
"fix-converted-myst.py",
"Makefile",
"netlify.toml",
"requirements-docs.txt",
"requirements.txt",

Expand Down
7 changes: 0 additions & 7 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
lesscpy
linkify-it-py
myst-parser
plone-sphinx-theme
sphinx-autobuild
sphinx-copybutton
sphinx-sitemap
sphinx-togglebutton
sphinxcontrib-spelling
sphinxext-opengraph
sphinxcontrib-video
vale==2.30.0
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ allowlist_externals =
echo

[testenv:plone6docs]
# New docs with sphinx-book-theme
# New docs with plone-sphinx-theme
# See [testenv:docs] for classic documentation
basepython = python3.11
skip_install = False
Expand All @@ -272,13 +272,9 @@ commands =
sphinx-build -b html -d _build/plone6docs/doctrees docs _build/plone6docs/html

[testenv:rtd-preview]
# New docs with sphinx-book-theme
# See [testenv:docs] for classic documentation
# Build docs on Read the Docs to preview pull requests using plone-sphinx-theme
basepython = python3.11
skip_install = False
package = editable
allowlist_externals =
mkdir
extras =
tests
deps =
Expand Down

0 comments on commit dbb5595

Please sign in to comment.