diff --git a/.gitignore b/.gitignore index 452db68f4..cfea64681 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ docs/volto # editor files .vscode + +*.pyc diff --git a/docs/addMetaData.py b/docs/addMetaData.py index 5529c81a7..008de0f3b 100644 --- a/docs/addMetaData.py +++ b/docs/addMetaData.py @@ -1,5 +1,6 @@ -import os import logging +import os + metadata_check = """--- myst: """ @@ -39,5 +40,5 @@ logger.info(f"{filename} html_meta prepended.") else: count_files["unmodified"] += 1 -logger.info(f'html_meta snippet added to {count_files["modified"]} files.') -logger.info(f'{count_files["unmodified"]} files unmodified.') +logger.info(f"html_meta snippet added to {count_files['modified']} files.") +logger.info(f"{count_files['unmodified']} files unmodified.") diff --git a/docs/backend/fields.md b/docs/backend/fields.md index b3c2212c8..ec3ea1c8c 100644 --- a/docs/backend/fields.md +++ b/docs/backend/fields.md @@ -85,7 +85,7 @@ The following tables describe the most commonly used field types, grouped by the | `Timedelta` | `timedelta` | Stores a Python `timedelta`. | `IField`, `IMinMax` | | `SourceText` | `unicode` | A text field intended to store source text, such as HTML or Python code. | `IField`, `IMinMaxLen` | | `Object` | n/a | Stores a Python object that conforms to the interface given as the `schema`. There is no standard widget for this. | `IField`, `IObject` | -| `URI` | `str` | A URI (URL) string. | `IField`, `MinMaxLen` | +| `URI` | `str` | A URI (URL) string. | `IField`, `IMinMaxLen` | | `Id` | `str` | A unique identifier, either a URI or a dotted name. | `IField`, `IMinMaxLen` | | `DottedName` | `str` | A dotted name string. | `IField`, `IMinMaxLen` | | `InterfaceField` | `Interface` | A Zope interface. | `IField` | diff --git a/docs/conf.py b/docs/conf.py index 3dfc36ce3..71eef7aa3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,16 +4,16 @@ # -- Path setup -------------------------------------------------------------- -import re -from datetime import datetime - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -# import os -# import sys -# sys.path.insert(0, os.path.abspath(".")) +import os +import re +import sys +from datetime import UTC, datetime + +sys.path.insert(0, os.path.abspath(".")) # -- Project information ----------------------------------------------------- @@ -22,7 +22,7 @@ copyright = "Plone Foundation" author = "Plone community" trademark_name = "Plone" -now = datetime.now() +now = datetime.now(UTC) year = str(now.year) # The version info for the project you're documenting, acts as replacement for @@ -44,6 +44,7 @@ # They can be extensions coming with Sphinx (named "sphinx.ext.*") # or your custom ones. extensions = [ + "collective.sphinxextexternalpackageversion", "myst_parser", "notfound.extension", "sphinx.ext.autodoc", @@ -99,17 +100,17 @@ r"https://github.com/plone/documentation/issues/new", r"https://javascript.plainenglish.io/you-dont-need-lodash-how-i-gave-up-lodash-693c8b96a07c", # Ignore pages that are rate limited or otherwise blocked - r"https://codesandbox.io/", #volto + r"https://codesandbox.io/", # volto r"https://docutils.sourceforge.io/", r"https://flaviocopes.com", # volto r"https://hosted.weblate.org/", r"https://medium.com", - r"https://stackoverflow.com", #volto - r"https://v5.reactrouter.com", #volto + r"https://stackoverflow.com", # volto + r"https://v5.reactrouter.com", # volto r"https://web.archive.org/", r"https://www.gnu.org", r"https://www.merriam-webster.com/", - r"https://www.npmjs.com", #volto + r"https://www.npmjs.com", # volto # Bad TLS certificate r"https://pastanaga.io", # See https://github.com/plone/volto/issues/8399 # Ignore redirects and rate limiting by github.com @@ -281,7 +282,7 @@ # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -html_title = "%(project)s v%(release)s" % {"project": project, "release": release} +html_title = f"{project} v{release}" html_css_files = ["search.css", ("print.css", {"media": "print"})] html_js_files = [] diff --git a/requirements.txt b/requirements.txt index 994eea9cf..df835e9fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +collective-sphinxextexternalpackageversion linkify-it-py plone-sphinx-theme<2 sphinx<9 # See https://github.com/plone/documentation/issues/2037