Skip to content

Commit

Permalink
feat(footer): add dynamic footer links support
Browse files Browse the repository at this point in the history
BREAKING CHANGE: If you already defined your custom footer links in `footer.html`, you need to remove them and defined them in `footer.yml` for further compatibility
  • Loading branch information
sparanoid committed Dec 1, 2018
1 parent c9aff3d commit b64617f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 0 additions & 4 deletions _app/_data/curtana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ clean_homepage: false
# Style post link color (if defined) for article list
# Default: false
colorful_list: false

# Show email subscription link in footer
# Default: false
subscription: false
Empty file added _app/_data/footer.yml
Empty file.
16 changes: 11 additions & 5 deletions _app/_includes/themes/curtana/includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
<li><a href="{{ '/' | relative_url }}">{{ amsf_site_name }}</a></li>

{% if site.credits %}
<li><a href="https://sparanoid.com/lab/amsf/" title="Almace Scaffolding">AMSF</a></li>
<li><a href="{{ site.data.curtana.meta.url }}" title="{{ site.data.curtana.meta.name }}">{{ site.data.curtana.meta.name }}</a></li>
<li>
<a href="https://sparanoid.com/lab/amsf/" title="Almace Scaffolding with theme {{ site.data.curtana.meta.name }}">AMSF</a>
</li>
{% endif %}

{% if site.data.curtana.subscription %}
<li><a href="{{ '/email-signup' | relative_url }}/">Email</a></li>
{% endif %}
{% for item in site.data.footer %}
{%- include amsf/relative_url url=item.url -%}
{%- assign item_url = amsf_relative_url -%}
{%- assign lowercased_title = item.title | slugify -%}
<li>
<a href="{{ item_url }}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</footer>
{% endunless %}
Expand Down

0 comments on commit b64617f

Please sign in to comment.