diff options
| author | 2022-04-20 00:12:09 -0400 | |
|---|---|---|
| committer | 2022-04-20 00:12:09 -0400 | |
| commit | 942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (patch) | |
| tree | 1c4d5d826655cdb812c88563a25410f8b54e41d2 /docs/sphinx | |
| parent | 8eeed31eb2f86ac982fa4b26f93b15828289c56d (diff) | |
New upstream version 8.2.0.upstream/8.2.0
Diffstat (limited to 'docs/sphinx')
| -rw-r--r-- | docs/sphinx/conf.py | 18 | ||||
| -rw-r--r-- | docs/sphinx/index.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.packages.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.packages.tzlocal.rst | 35 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.command.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.compile.markdown.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.compile.rest.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.compile.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.misc.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.task.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.task.sitemap.rst | 10 | ||||
| -rw-r--r-- | docs/sphinx/nikola.plugins.template.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola.rst | 1 | ||||
| -rw-r--r-- | docs/sphinx/nikola_titles_for_sphinx.py | 32 | ||||
| -rw-r--r-- | docs/sphinx/requirements-docs.txt | 2 |
16 files changed, 45 insertions, 63 deletions
diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py index 7d34890..15c1ac0 100644 --- a/docs/sphinx/conf.py +++ b/docs/sphinx/conf.py @@ -1,5 +1,9 @@ # -*- coding: utf-8 -*- -# + +from __future__ import unicode_literals +import os +import sys + # Nikola documentation build configuration file, created by # sphinx-quickstart on Sun Sep 22 17:43:37 2013. # @@ -15,19 +19,17 @@ # 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. -# sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath(os.path.dirname(__file__))) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' -from __future__ import unicode_literals - # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', 'nikola_titles_for_sphinx'] # extensions.append('sphinxcontrib.gist') # Add any paths that contain templates here, relative to this directory. @@ -36,6 +38,8 @@ templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' +source_parsers = {'.rst': 'nikola_titles_for_sphinx.NikolaTitlesRSTParser'} + # The encoding of source files. # source_encoding = 'utf-8-sig' @@ -51,9 +55,9 @@ copyright = '2012-2021, The Nikola Contributors' # built documents. # # The short X.Y version. -version = '8.1.3' +version = '8.2.0' # The full version, including alpha/beta/rc tags. -release = '8.1.3' +release = '8.2.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/sphinx/index.rst b/docs/sphinx/index.rst index b448f76..f5d710e 100644 --- a/docs/sphinx/index.rst +++ b/docs/sphinx/index.rst @@ -22,6 +22,7 @@ visible in this version of Nikola docs. internals social_buttons path_handlers + support .. toctree:: :maxdepth: 5 diff --git a/docs/sphinx/nikola.packages.rst b/docs/sphinx/nikola.packages.rst index 916b3ec..ec65fb1 100644 --- a/docs/sphinx/nikola.packages.rst +++ b/docs/sphinx/nikola.packages.rst @@ -14,4 +14,3 @@ Subpackages nikola.packages.datecond nikola.packages.pygments_better_html - nikola.packages.tzlocal diff --git a/docs/sphinx/nikola.packages.tzlocal.rst b/docs/sphinx/nikola.packages.tzlocal.rst deleted file mode 100644 index 944562e..0000000 --- a/docs/sphinx/nikola.packages.tzlocal.rst +++ /dev/null @@ -1,35 +0,0 @@ -nikola.packages.tzlocal package -=============================== - -.. automodule:: nikola.packages.tzlocal - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -nikola.packages.tzlocal.unix module ------------------------------------ - -.. automodule:: nikola.packages.tzlocal.unix - :members: - :undoc-members: - :show-inheritance: - -nikola.packages.tzlocal.win32 module ------------------------------------- - -.. automodule:: nikola.packages.tzlocal.win32 - :members: - :undoc-members: - :show-inheritance: - -nikola.packages.tzlocal.windows\_tz module ------------------------------------------- - -.. automodule:: nikola.packages.tzlocal.windows_tz - :members: - :undoc-members: - :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.command.rst b/docs/sphinx/nikola.plugins.command.rst index 8c97515..831364f 100644 --- a/docs/sphinx/nikola.plugins.command.rst +++ b/docs/sphinx/nikola.plugins.command.rst @@ -145,4 +145,3 @@ nikola.plugins.command.version module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.compile.markdown.rst b/docs/sphinx/nikola.plugins.compile.markdown.rst index b27da4e..3453a9e 100644 --- a/docs/sphinx/nikola.plugins.compile.markdown.rst +++ b/docs/sphinx/nikola.plugins.compile.markdown.rst @@ -32,4 +32,3 @@ nikola.plugins.compile.markdown.mdx\_podcast module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.compile.rest.rst b/docs/sphinx/nikola.plugins.compile.rest.rst index 3f5d0bd..ef2c101 100644 --- a/docs/sphinx/nikola.plugins.compile.rest.rst +++ b/docs/sphinx/nikola.plugins.compile.rest.rst @@ -88,4 +88,3 @@ nikola.plugins.compile.rest.youtube module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.compile.rst b/docs/sphinx/nikola.plugins.compile.rst index e89de36..ece9a1b 100644 --- a/docs/sphinx/nikola.plugins.compile.rst +++ b/docs/sphinx/nikola.plugins.compile.rst @@ -49,4 +49,3 @@ nikola.plugins.compile.php module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.misc.rst b/docs/sphinx/nikola.plugins.misc.rst index 2cab79e..1a5aba9 100644 --- a/docs/sphinx/nikola.plugins.misc.rst +++ b/docs/sphinx/nikola.plugins.misc.rst @@ -24,4 +24,3 @@ nikola.plugins.misc.taxonomies\_classifier module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.rst b/docs/sphinx/nikola.plugins.rst index f3e8680..86a4d7a 100644 --- a/docs/sphinx/nikola.plugins.rst +++ b/docs/sphinx/nikola.plugins.rst @@ -28,4 +28,3 @@ nikola.plugins.basic\_import module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.task.rst b/docs/sphinx/nikola.plugins.task.rst index 327887a..cf6b71b 100644 --- a/docs/sphinx/nikola.plugins.task.rst +++ b/docs/sphinx/nikola.plugins.task.rst @@ -168,4 +168,3 @@ nikola.plugins.task.taxonomies module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.plugins.task.sitemap.rst b/docs/sphinx/nikola.plugins.task.sitemap.rst deleted file mode 100644 index 774b09a..0000000 --- a/docs/sphinx/nikola.plugins.task.sitemap.rst +++ /dev/null @@ -1,10 +0,0 @@ -nikola.plugins.task.sitemap package -=================================== - -Module contents ---------------- - -.. automodule:: nikola.plugins.task.sitemap - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/sphinx/nikola.plugins.template.rst b/docs/sphinx/nikola.plugins.template.rst index 3d4b05e..984644b 100644 --- a/docs/sphinx/nikola.plugins.template.rst +++ b/docs/sphinx/nikola.plugins.template.rst @@ -24,4 +24,3 @@ nikola.plugins.template.mako module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola.rst b/docs/sphinx/nikola.rst index 28a15c3..710ca02 100644 --- a/docs/sphinx/nikola.rst +++ b/docs/sphinx/nikola.rst @@ -113,4 +113,3 @@ nikola.winutils module :members: :undoc-members: :show-inheritance: - diff --git a/docs/sphinx/nikola_titles_for_sphinx.py b/docs/sphinx/nikola_titles_for_sphinx.py new file mode 100644 index 0000000..06b76dc --- /dev/null +++ b/docs/sphinx/nikola_titles_for_sphinx.py @@ -0,0 +1,32 @@ +import sphinx.parsers +from docutils.statemachine import StringList +from typing import TYPE_CHECKING, Any, Dict, List, Type, Union + +if TYPE_CHECKING: + from sphinx.application import Sphinx + +TITLE_MARKER = ".. title:" + + +class NikolaTitlesRSTParser(sphinx.parsers.RSTParser): + def decorate(self, content: StringList) -> None: + """Preprocess reST content before parsing.""" + super().decorate(content) + for line in content[:20]: + if line.startswith(TITLE_MARKER): + title = line[len(TITLE_MARKER) :].strip() + fence = "=" * len(title) + content.insert(0, "", "<generated>", 0) + content.insert(0, fence, "<generated>", 0) + content.insert(0, title, "<generated>", 0) + content.insert(0, fence, "<generated>", 0) + + +def setup(app: "Sphinx") -> Dict[str, Any]: + app.add_source_parser(NikolaTitlesRSTParser, override=True) + + return { + "version": "0.1.0", + "parallel_read_safe": True, + "parallel_write_safe": True, + } diff --git a/docs/sphinx/requirements-docs.txt b/docs/sphinx/requirements-docs.txt index 443470f..22bb6a1 100644 --- a/docs/sphinx/requirements-docs.txt +++ b/docs/sphinx/requirements-docs.txt @@ -1,2 +1,2 @@ --r ../../requirements-extras.txt pyparsing>=2.0.2 +Sphinx>=4.2.0 |
