stouputils.applications.automatic_docs.sphinx.index_page module#

Generation of the documentation landing page.

The default page is the README with a version selector and a module toctree appended. Projects wanting something else pass their own callable as generate_index_function.

generate_index_md(readme_path: str, index_path: str, project: str, github_user: str, github_repo: str, get_versions_function: ~collections.abc.Callable[[str, str, int], list[str]] = <function get_versions_from_github>, recent_minor_versions: int = 2) None[source]#

Generate index.md (MyST) from README.md content.

This keeps the README content as Markdown (no conversion) and uses the MyST toctree directive to include module docs.

Parameters:
  • readme_path (str) – Path to the README.md file

  • index_path (str) – Path where index.md should be created

  • project (str) – Name of the project

  • github_user (str) – GitHub username

  • github_repo (str) – GitHub repository name

  • get_versions_function (Callable[[str, str, int], list[str]]) – Function to get versions from GitHub

  • recent_minor_versions (int) – Number of recent minor versions to show all patches for. Defaults to 2