mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
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:
01eb08c42b/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
16 lines
919 B
HTML
16 lines
919 B
HTML
<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">✨</a>
|
|
</p>
|
|
</div>
|