Add a submenu to a distill rmarkdown website?

105 Views Asked by At

I am creating a distill website using rmarkdown and would like to add a submenu in the navigation bar. I found this feature request/issue on GitHub but have not been able to find a solution.

With the below _site.yml and index.Rmd the submenu text appears in the menu dropdown but is greyed-out and not clickable/selectable.

_site.yml:

name: "submenuTest"
title: "Submenu test"
description: |
  Submenu test
output_dir: "_site"
navbar:
  right:
    - text: "Home"
      href: index.html
    - text: 'Menu'
      menu:
      - text: 'Page'
        href: page.html
      - text: 'Submenu'
        menu:
        - text: 'Sub Page'
          href: subpage.html
output: distill::distill_article

index.Rmd:

---
title: "Submenu test"
description: |
  Welcome to the website. I hope you enjoy it!
site: distill::distill_website
---

# here is my page content

In a plain rmarkdown .html (can use the above .yml and .Rmd examples but without the output: distill::distill_article and site: distill::distill_website lines) renders with a workable submenu.

0

There are 0 best solutions below