mbr-markdown-browser 0.4.5

A fast, featureful markdown viewer, browser, and (optional) static site generator
{% set asset_base = relative_base | default(value="/.mbr/") %}
<!doctype html>
<html lang="en">
  <head>
{% include "_head.html" %}
    <title>{{title_prefix | default(value="")}}{{current_path | default(value="Directory") | escape}}{{title_suffix | default(value="")}}</title>
  </head>
  <body>
{% if sidebar_style == "single" %}<mbr-browse-single></mbr-browse-single>{% endif %}
{% include "_nav.html" %}
    <main id="wrapper" class="container" data-pagefind-body>
      <span class="sr-only" data-pagefind-weight="10">{{ current_dir_name | default(value="") }}</span>
      <h1 data-pagefind-meta="title">{{ current_dir_name | default(value="Directory") }}</h1>

      {% if subdirs %}
      <section>
        <h2>Folders</h2>
        <ul>
          {% for subdir in subdirs %}
          <li>
            <a href="{{ subdir.url_path }}">
              <strong>{{ subdir.name }}</strong>
            </a>
          </li>
          {% endfor %}
        </ul>
      </section>
      {% endif %}

      {% if files %}
      <section>
        <h2>Files</h2>
        {% for file in files %}
        <article>
          <header>
            <h3><a href="{{ file.url_path }}">{{ file.title | default(value=file.name) }}</a></h3>
            {% if file.description %}
            <p>{{ file.description }}</p>
            {% endif %}
          </header>
          <footer>
            <small>
              Modified: {{ file.modified_date | default(value="Unknown") }}
              {% if file.tags %}
              | Tags: {{ file.tags }}
              {% endif %}
            </small>
          </footer>
        </article>
        {% endfor %}
      </section>
      {% else %}
        {% if not subdirs %}
        <p><em>No markdown files or folders found in this directory.</em></p>
        {% else %}
        <p><em>No markdown files found in this directory.</em></p>
        {% endif %}
      {% endif %}
    </main>
    <footer class="container" data-pagefind-ignore>
      <nav>
        <ul>
          <li>
            {% if parent_path %}
            <a href="{{ parent_path }}" role="button" class="outline secondary">&lt; Up to Parent Directory</a>
            {% else %}
            <button disabled class="outline secondary">&lt; Up to Parent Directory</button>
            {% endif %}
          </li>
        </ul>
      </nav>
    </footer>
{% include "_footer.html" %}
  </body>
{% include "_scripts.html" %}
</html>