etiennebacher / altdoc

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

`$ALTDOC_MAN_BLOCK` is not correctly parsed in the sidebar of `website_quarto` #266

Closed kazuyanagimoto closed 4 months ago

kazuyanagimoto commented 4 months ago

Hi @etiennebacher and @vincentarelbundock. Thank you for the amazing work of introducing modern documentation tools to R packages! I tried to migrate my package documentation to website_quarto. https://github.com/kazuyanagimoto/quartomonothemer

However, all the man/*.Rd files are named as qmd in the sidebar of the sidebar's Reference section, and as a result, the links to the reference document are broken.

Screenshot 2024-04-01 011855

It seems that all the related *.qmd and *.html is correctly rendered but _quarto/_quarto.yml's sidebar section is not correctly generated. Here I put the generated _quarto/_quarto.yml

project:
  type: website
  output-dir: ../docs/
website:
  title: quartomonothemer
  navbar:
    search: true
    right:
      - icon: github
        href: https://github.com/kazuyanagimoto/quartomonothemer
        aria-label: quartomonothemer GitHub
  sidebar:
    collapse-level: 1
    contents:
      - text: Home
        file: index.qmd
      - section: Reference
        contents:
          - text: qmd
            file: qmd
          - text: qmd
            file: qmd
          - text: qmd
            file: qmd
      - text: News
        file: NEWS.md
      - text: License
        file: LICENSE.md
      - text: Citation
        file: CITATION.md
vincentarelbundock commented 4 months ago

Thanks for the report. I just pushed a change to Github that should fix this.

For the record, I think the problem was due to an over aggressive regular expression which dropped your file names with _quarto in them.

kazuyanagimoto commented 4 months ago

Thank you for the quick fix! It solves the problem.