<div class="row">
  <ul class="col-sm-6 list-inline">
    {% if not HIDE_AUTHORS %}
      <li class="list-inline-item"><a href="{{ SITEURL }}/{{ AUTHORS_URL }}">Authors</a></li>
    {% endif %}
    <li class="list-inline-item"><a href="{{ SITEURL }}/{{ ARCHIVES_URL }}">Archives</a></li>
    <li class="list-inline-item"><a href="{{ SITEURL }}/{{ CATEGORIES_URL }}">Categories</a></li>
    {% if tags|length %}
      <li class="list-inline-item"><a href="{{ SITEURL }}/{{ TAGS_URL }}">Tags</a></li>
    {% endif %}
  </ul>
  <p class="col-sm-6 text-sm-right text-muted">
    Generated by <a href="https://github.com/getpelican/pelican" target="_blank">Pelican</a>
    / <a href="https://github.com/nairobilug/pelican-alchemy" target="_blank">&#x2728;</a>
  </p>
</div>

<div class="row">
  <ul class="col-sm-6 list-inline">
    {% if not HIDE_AUTHORS %}
      <li class="list-inline-item"><a href="{{ SITEURL }}/{{ AUTHORS_URL or AUTHORS_SAVE_AS or 'authors.html' }}">Authors</a></li>
    {% endif %}
    <li class="list-inline-item"><a href="{{ SITEURL }}/{{ ARCHIVES_URL or ARCHIVES_SAVE_AS or 'archives.html' }}">Archives</a></li>
    <li class="list-inline-item"><a href="{{ SITEURL }}/{{ CATEGORIES_URL or CATEGORIES_SAVE_AS or 'categories.html' }}">Categories</a></li>
    {% if tags|length %}
      <li class="list-inline-item"><a href="{{ SITEURL }}/{{ TAGS_URL or TAGS_SAVE_AS or 'tags.html' }}">Tags</a></li>
    {% endif %}
  </ul>
  <p class="col-sm-6 text-sm-right text-muted">
    Generated by <a href="https://github.com/getpelican/pelican" target="_blank">Pelican</a>
    / <a href="https://github.com/nairobilug/pelican-alchemy" target="_blank">&#x2728;</a>
  </p>
</div>

Support all edge cases for direct template links
Support all edge cases for direct template links

Non-hardcoded paths are not that simple.

Direct templates do not always have meaningful *_URL or even *_SAVE_AS
values. More than that, those variables are not even defined by default.
Therefore we need to replicate the logic used by Pelican itself when
calculating the path to direct template output.

Related:

- DIRECT_TEMPLATES handling by Pelican:
  https://github.com/getpelican/pelican/blob/01eb08c42b543450ee5e0e3de3854526708a6711/pelican/generators.py#L537-L550
- Pelican issue for "Why are CATEGORIES_URL and TAGS_URL gone?"
  https://github.com/getpelican/pelican/issues/1225

Merges #75
