How to use submenu in rmarkdown navbar?

Roc*_*nce 6 r navbar r-markdown

I am trying to create a submenu in rmarkdown navbar

here is my _site.yml

name: Test dashboard
navbar:
  title: Test dashboard
  left:
  - text: by Commo (intake)
    menu:
    - text: "Menu"
      href: index.html
    - text: "SubMenu"
      menu:
      - text: "Item1"
      - href: index2.html 
      - text: "Item2"
      - href: index3.html 
output:
  html_document:
    include:
      after_body: footer.html
    css: styles.css
    source_code: embed
    lib_dir: site_libs
    mathjax: null
    self_contained: false
output_dir: _site
Run Code Online (Sandbox Code Playgroud)

However for whatever reason the links of the submenu are not displayed properly. THey are below the section names, on a very thin line which has a few pixel height.

在此处输入图片说明

Does that make sense?

I am using

> packageVersion("rmarkdown")
[1] ‘2.1’
Run Code Online (Sandbox Code Playgroud)

Pet*_*e K 10

我相信我找到了它无法正常工作的原因。当我在子菜单级别的 s-之前删除额外的破折号 ( ) 时,href一切似乎都没问题。

整个 _site.yml 看起来像这样:

name: Test dashboard
navbar:
  title: Test dashboard
  left:
  - text: by Commo (intake)
    menu:
    - text: "Menu"
      href: index.html
    - text: "SubMenu"
      menu:
      - text: "Item1"
        href: index2.html 
      - text: "Item2"
        href: https://getbootstrap.com/docs/4.4/components/alerts/
output:
  html_document:
    include:
      after_body: footer.html
    css: styles.css
    source_code: embed
    lib_dir: site_libs
    mathjax: null
    self_contained: false
output_dir: _site
Run Code Online (Sandbox Code Playgroud)

我正在使用相同的 rmarkdown 版本 (2.1)。