docs

Configuration for documentation with Sphinx and ReadTheDocs.

Functions:

copy_docs_styling(repo_path, templates)

Copy custom styling for documentation to the desired repository.

ensure_doc_requirements(repo_path, templates)

Ensure <docs_dir>/requirements.txt contains the required entries.

make_404_page(repo_path, templates)

type repo_path

Path

make_alabaster_theming()

Make the custom stylesheet for the alabaster Sphinx theme.

make_conf(repo_path, templates)

Add conf.py configuration file for Sphinx.

make_docs_source_rst(repo_path, templates)

Create the “Source” page in the documentation, and add the associated image.

make_docutils_conf(repo_path, templates)

Add configuration for Docutils.

make_readthedocs_theming()

Make the custom stylesheet for the ReadTheDocs Sphinx theme.

make_rtfd(repo_path, templates)

Add configuration for ReadTheDocs.

rewrite_docs_index(repo_path, templates)

Update blocks in the documentation index.rst file.

copy_docs_styling(repo_path, templates)[source]

Copy custom styling for documentation to the desired repository.

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

ensure_doc_requirements(repo_path, templates)[source]

Ensure <docs_dir>/requirements.txt contains the required entries.

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

make_404_page(repo_path, templates)[source]
Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

make_alabaster_theming()[source]

Make the custom stylesheet for the alabaster Sphinx theme.

Return type

str

Returns

The custom stylesheet.

make_conf(repo_path, templates)[source]

Add conf.py configuration file for Sphinx.

https://www.sphinx-doc.org/en/master/index.html

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

make_docs_source_rst(repo_path, templates)[source]

Create the “Source” page in the documentation, and add the associated image.

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

make_docutils_conf(repo_path, templates)[source]

Add configuration for Docutils.

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

make_readthedocs_theming()[source]

Make the custom stylesheet for the ReadTheDocs Sphinx theme.

Return type

str

Returns

The custom stylesheet.

make_rtfd(repo_path, templates)[source]

Add configuration for ReadTheDocs.

https://readthedocs.org/

See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]

rewrite_docs_index(repo_path, templates)[source]

Update blocks in the documentation index.rst file.

Parameters
  • repo_path (Path) – Path to the repository root.

  • templates (Environment)

Return type

List[str]