etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
65 stars 9 forks source link

Function titles in the sidebar instead of names #214

Closed vincentarelbundock closed 9 months ago

vincentarelbundock commented 9 months ago

Using the latest version, I no longer get the function names in the sidebar, but instead I get the long titles. I think this relates to the discussion we had recently. Screenshot:

Screenshot 2023-12-12 150319

etiennebacher commented 9 months ago

I'll take a look when I have some time but things are a bit busy right now.

Just for ref, I changed the title of the qmd file in #208 but this only changed the .qmd file generated. If the sidebar title is extracted from the .qmd title then this could be the cause

vincentarelbundock commented 9 months ago

Yes, that sounds right. In Quarto, the sidebar is built from the title of documents. We would have to the names ourselves if we don't want that, which is kind of burdensome.

etiennebacher commented 9 months ago

The solution would be to specify custom names in _quarto.yml. For example, this part of a sidebar:

        contents:
          - man/emfx.qmd
          - man/etwfe.qmd

would become

        contents:
          - text: emfx
            href: man/emfx.qmd
          - text: etwfe
            href: man/etwfe.qmd

This can be done in .import_man()

vincentarelbundock commented 9 months ago

https://github.com/etiennebacher/altdoc/pull/215