Skip to content

Website navigation bar not rendered properly #7881

Description

@jdblischak

I recently noticed that the navbar of the website is not rendered properly. The Portuguese cheatsheet is unavailable from the dropdown menu, and the link to the GitHub repo on the right is also missing.

Image

I initially thought the problem was a missing closing HTML tag, but now I think the problem is caused by litedown::fuse_site() interpreting the indentation as a code block. From the source, you can see that the problem was the introduction of <pre><code> and HTML-escaping all of the code inside:

        <li class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Cheatsheet</a>
          <ul class="dropdown-menu">
            <li><a class="dropdown-item" href="assets/datatable_cheatsheet.pdf">English</a></li>
            <li><a class="dropdown-item" href="assets/datatable_cheatsheet_fr.pdf">Francais</a></li>
<pre><code>        &lt;li&gt;&lt;a class=&quot;dropdown-item&quot; href=&quot;assets/datatable_cheatsheet_pt_br.pdf&quot;&gt;Portuguese&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  &lt;ul class=&quot;navbar-nav ms-auto&quot;&gt;
    &lt;li class=&quot;nav-item&quot;&gt;&lt;a class=&quot;nav-link&quot; href=&quot;https://github.com/Rdatatable/data.table&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</code></pre>
  </div>
</nav></nav>

I was able to reproduce this locally as well. And if I remove all the indentation from site/_navbar.html, the navbar renders properly. Obviously that isn't an ideal solution, so I'm open to ideas.

xref: #7534, #7630

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions