Closed pedro-psb closed 2 months ago
Some notes from early experiments:
# on hooks.py
def on_nav(nav, config, files):
"""
Create repo-index-toc data here.
See hook events: https://www.mkdocs.org/dev-guide/plugins/#events
"""
# get each repository subtree in nav.items (Tree of Section/Pages)
# for each subtree, serialize to markdown list structure
# save serialized markdown string
# write to files here or on_page events
...
To improve the navigability of the website, I want to add landing page for each repository listed with a generated ToC.
This should enable skimming through the entire summary, instead of having to expand all the sections one-by-one.
Requirements
Given the main left navbar, which list the repository namespaces (e.g "Pulp Core", "Pulp RPM", "Pulp CLI", etc)
As a user who want to find info about a specific Repository, when clicking on a Repository namespace I wanna see:
{repository}/docs/index.md
.index.md
, if it exists) with the entire ToC of that Repository.