diff options
author | Valentin Popov <info@valentineus.link> | 2018-04-24 19:13:00 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-04-24 19:13:00 +0300 |
commit | d11e3a98d4ff39bbce8a9842c93356fac3d8f0b2 (patch) | |
tree | fa05aac6d444ad5d0080f52a9c043b6982631124 | |
parent | ebceb1c3dec8478dbbaa29c7b22d509354c8646d (diff) | |
download | popov.link-d11e3a98d4ff39bbce8a9842c93356fac3d8f0b2.tar.xz popov.link-d11e3a98d4ff39bbce8a9842c93356fac3d8f0b2.zip |
Dynamic footer
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | _data/footer.yml | 8 | ||||
-rw-r--r-- | _includes/footer.html | 14 |
2 files changed, 17 insertions, 5 deletions
diff --git a/_data/footer.yml b/_data/footer.yml new file mode 100644 index 0000000..ac0a1e2 --- /dev/null +++ b/_data/footer.yml @@ -0,0 +1,8 @@ +- name: "Contact" + path: "mailto:info@valentineus.link" + +- name: "Subscription" + path: "/atom.xml" + +- name: "Site Map" + path: "/sitemap.xml" diff --git a/_includes/footer.html b/_includes/footer.html index 52da9d2..b6af6e0 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -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> - <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> + {% 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> + {% endunless %} + {% endfor %} </small> </footer> |