Skip to content

Commit

Permalink
🐛 fix(footer): show feed icon on Zola 0.19.0 (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
welpo authored Jun 21, 2024
1 parent 448250f commit fdb63c8
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 15 deletions.
5 changes: 1 addition & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,13 @@ skip_anchor_prefixes = [
title = "~/tabi"
description = "tabi es un tema de Zola rápido, liviano y moderno con JavaScript opcional y una puntuación perfecta en Lighthouse."
generate_feed = true
compile_sass = true
minify_html = true
taxonomies = [{name = "tags", feed = true}]
build_search_index = true

[languages.ca]
title = "~/tabi"
description = "tabi és un tema de Zola ràpid, lleuger i modern amb JavaScript opcional i una puntuació perfecta a Lighthouse."
generate_feed = true
compile_sass = true
minify_html = true
taxonomies = [{name = "tags", feed = true}]

[extra]
Expand Down Expand Up @@ -217,6 +213,7 @@ menu = [
]

# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true.
# Note for Zola 0.19.X users: when `feed_filenames` has two filenames, only the first one will be linked in the footer.
feed_icon = true

# Show the full post content in the Atom feed.
Expand Down
1 change: 0 additions & 1 deletion content/_index.ca.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
+++
path = "/"
title = "Publicacions recents"
sort_by = "date"
template = "section.html"
Expand Down
1 change: 0 additions & 1 deletion content/_index.es.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
+++
path = "/"
title = "Publicaciones recientes"
sort_by = "date"
template = "section.html"
Expand Down
1 change: 0 additions & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
+++
path = "/"
title = "Latest posts"
sort_by = "date"
template = "section.html"
Expand Down
1 change: 0 additions & 1 deletion content/blog/_index.ca.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
Expand Down
1 change: 0 additions & 1 deletion content/blog/_index.es.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
Expand Down
1 change: 0 additions & 1 deletion content/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
+++
paginate_by = 5
path = "/blog"
title = "Blog"
sort_by = "date"
template = "section.html"
Expand Down
4 changes: 3 additions & 1 deletion content/blog/mastering-tabi-settings/index.ca.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Domina la configuració de tabi: guia completa"
date = 2023-09-18
updated = 2024-06-19
updated = 2024-06-22
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."

[taxonomies]
Expand Down Expand Up @@ -654,6 +654,8 @@ Per utilitzar una icona personalitzada, pots afegir-la al directori `static/soci

Pots afegir un enllaç al teu feed RSS/Atom al peu de pàgina amb `feed_icon = true`.

Nota pels usuaris de Zola 0.19.X: quan hi ha dos noms de fitxer a `feed_filenames`, només s'enllaçarà el primer al peu de pàgina.

#### Menú de peu de pàgina

| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
Expand Down
4 changes: 3 additions & 1 deletion content/blog/mastering-tabi-settings/index.es.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Domina la configuración de tabi: guía completa"
date = 2023-09-18
updated = 2024-06-19
updated = 2024-06-22
description = "Descubre las múltiples maneras en que puedes personalizar tabi."

[taxonomies]
Expand Down Expand Up @@ -656,6 +656,8 @@ Para usar un icono personalizado, puedes añadirlo al directorio `static/social_

Puedes añadir un enlace a tu feed RSS/Atom en el pie de página con `feed_icon = true`.

Nota para usuarios de Zola 0.19.X: cuando hay dos nombres de archivo en `feed_filenames`, solo se enlazará el primero en el pie de página.

### Menú de pie de página

| Página | Sección | `config.toml` | Respeta jerarquía | Requiere JavaScript |
Expand Down
4 changes: 3 additions & 1 deletion content/blog/mastering-tabi-settings/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
title = "Mastering tabi Settings: A Comprehensive Guide"
date = 2023-09-18
updated = 2024-06-19
updated = 2024-06-22
description = "Discover the many ways you can customise your tabi site."

[taxonomies]
Expand Down Expand Up @@ -659,6 +659,8 @@ To use a custom icon, you can add it to your site's `static/social_icons` direct

You can add a link to your RSS/Atom feed to the footer with `feed_icon = true`.

Note for Zola 0.19.X users: when there are two filenames in `feed_filenames`, only the first one will be linked in the footer.

### Footer Menu

| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
Expand Down
9 changes: 7 additions & 2 deletions templates/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
<nav class="socials nav-navs">
{%- if config.extra.socials or config.extra.email %}
<ul>
{%- if config.generate_feed and config.extra.feed_icon -%}
{# Feed icon #}
{# Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` #}
{% set generate_feed = config.generate_feeds | default(value=config.generate_feed) %}
{% set feed_url = config.feed_filenames[0] | default(value=(config.feed_filename)) %}

{%- if generate_feed and config.extra.feed_icon and feed_url -%}
<li>
<a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href={{ get_url(path=config.feed_filename, lang=lang, trailing_slash=false) | safe }}>
<a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href={{ get_url(path=feed_url, lang=lang, trailing_slash=false) | safe }}>
<img alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}">
</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ menu = [
]

# The RSS icon will be shown if (1) it's enabled and (2) the following variable is set to true.
# Note for Zola 0.19.X users: when `feed_filenames` has two filenames, only the first one will be linked in the footer.
feed_icon = true

# Show the full post content in the Atom feed.
Expand Down

0 comments on commit fdb63c8

Please sign in to comment.