Dynamic footer

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-04-24 20:13:00 +04:00
parent ebceb1c3de
commit d11e3a98d4
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3
2 changed files with 17 additions and 5 deletions

8
_data/footer.yml Normal file
View File

@ -0,0 +1,8 @@
- name: "Contact"
path: "mailto:info@valentineus.link"
- name: "Subscription"
path: "/atom.xml"
- name: "Site Map"
path: "/sitemap.xml"

View File

@ -1,9 +1,13 @@
<footer class="footer">
<small>
<a href="mailto:{{ site.author.email | strip_newlines | strip_html | strip | normalize_whitespace | uri_escape }}">Contact</a>
{% for link in site.data.footer %}
<a href="{{ link.path | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape }}">
{{ link.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify }}
</a>
<!-- Separation -->
{% unless forloop.last %}
<span>|</span>
<a href="{{ site.rss | relative_url | uri_escape }}">Subscription</a>
<span>|</span>
<a href="{{ '/sitemap.xml' | relative_url | uri_escape }}">Site Map</a>
{% endunless %}
{% endfor %}
</small>
</footer>