Skip to content

Allow addition content in sidebar (like navbar) #518

Closed
@jhildenbiddle

Description

@jhildenbiddle

Docsify ignores content in the sidebar markdown file that is not contained within an li element.

For example, this markdown:

<p>Foo</p>

- Some Text

<p>Bar</p>

Will render as:

<div class="sidebar-nav">
  <ul>
    <li>Some Text</li>
  </ul>
</div>

The two paragraph tags are ignored (as would any content not contained within an li element). I would expect the output to be as follows:

<div class="sidebar-nav">
  <p>Foo</p>
  <ul>
    <li>Some Text</li>
  </ul>
  <p>Bar</p>
</div>

Rendering all content found in the sidebar markdown file would match docsify's behavior of rendering additional content found in the navbar markdown file. For example:

The following navbar markdown:

Foo

- Some Text

Bar

Is rendered as the following HTML:

<nav class="app-nav">
  <p>Foo</p>
    <ul>
      <li>Text</li>
    </ul>
  <p>Bar</p>
</nav>

Ideally, the sidebar would offer the same flexibility.

Thanks!

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