timvink / mkdocs-print-site-plugin

MkDocs Plugin that adds an additional page that combines all pages, allowing easy exports to PDF and standalone HTML.
https://timvink.github.io/mkdocs-print-site-plugin/
MIT License
142 stars 24 forks source link

Sections with sub-sections not correctly rendered in sidebar TOC #83

Open brenard opened 1 year ago

brenard commented 1 year ago

Hi,

On LdapSaisie project documentation, I try to use your great plugin to generate an all-in-one page version of the documentation (as currently done with Docbook version of the doc). I have problem with my Configuration section which contain sub-sections :

My nav section from mydocs.yml :

nav:
- Introduction: index.md
- Installation:
  - Pré-requis: install/requirements.md
  - Téléchargement: install/download.md
  - Arborescence du projet: install/arbo.md
  - Tutoriel d'installation: install/howto.md
[...]
- Configuration:
  - Introduction: conf/index.md
  - Configuration globale:
    - Introduction: conf/global/index.md
    - Connexion LDAP:
      - Configuration des serveurs LDAP: conf/global/ldap/index.md
      - Profils d'utilisateurs (LSprofile): conf/global/ldap/LSprofile.md
      - Sous-niveaux de connexion (subDn): conf/global/ldap/subDn.md
      - Récupération de mot de passe: conf/global/ldap/recoverPassword.md
    - Configuration de la journalisation (LSlog): conf/global/LSlog.md
    - Format paramétrable (LSformat): conf/global/LSformat.md
    - Paramètres étendus des recherches dans l'annuaire: conf/global/LDAP_search_params.md
  - Objets de l'annuaire:
    [...]
- API: api/index.md
[...]

The TOC generated by mkdocs in the multi-pages version : Screenshot 2023-06-12 at 17-53-51 Configuration des serveurs LDAP - LdapSaisie

__The TOC generated in all-in-one page version :___ Screenshot 2023-06-12 at 17-52-54 Print Site - LdapSaisie

Here, all sub-sections of the Configuration section are ignored (but the Introduction page is included). I try to adjust the toc_depth option, but it seem to have no effect.

Note: you could see the result here. I disabled the enumerate_headings since, because I don't understand why the count of roman numbered sections is keeped across grec numbered sections (but it another problem).

superpoussin22 commented 7 months ago

same issue for me

sunshowers commented 3 weeks ago

I ran into this and I believe https://github.com/timvink/mkdocs-print-site-plugin/pull/115 should fix it.