✨ feat(feed): support hiding pages and sections (#227)
This commit is contained in:
parent
6b69cf7a3e
commit
920aa609f0
@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Domina la configuració de tabi: guia completa"
|
||||
date = 2023-09-18
|
||||
updated = 2023-11-24
|
||||
updated = 2023-12-04
|
||||
description = "Descobreix les múltiples maneres en què pots personalitzar tabi."
|
||||
|
||||
[taxonomies]
|
||||
@ -442,6 +442,14 @@ Per obtenir més informació, incloent instruccions sobre com crear un subconjun
|
||||
|
||||
Per defecte, el feed Atom només conté el resum o descripció de les teves publicacions. Pots incloure el contingut complet de les publicacions establint `full_content_in_feed = true` a `config.toml`.
|
||||
|
||||
### Amagar contingut del feed
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Pots amagar pàgines específiques o seccions senceres del feed amb `hide_from_feed = true`.
|
||||
|
||||
### Comentaris {#afegir-comentaris}
|
||||
|
||||
| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript |
|
||||
|
@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Domina la configuración de tabi: guía completa"
|
||||
date = 2023-09-18
|
||||
updated = 2023-11-24
|
||||
updated = 2023-12-04
|
||||
description = "Descubre las múltiples maneras en que puedes personalizar tabi."
|
||||
|
||||
[taxonomies]
|
||||
@ -440,6 +440,14 @@ Para obtener más información, incluyendo instrucciones sobre cómo crear un su
|
||||
|
||||
Por defecto, el feed Atom solo contiene el resumen/descripción de tus publicaciones. Puedes incluir el contenido completo de las publicaciones estableciendo `full_content_in_feed = true` en `config.toml`.
|
||||
|
||||
### Ocultar contenido del feed
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
Puedes ocultar páginas específicas o secciones enteras del feed con `hide_from_feed = true`.
|
||||
|
||||
### Comentarios {#añadir-comentarios}
|
||||
|
||||
| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript |
|
||||
|
@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Mastering tabi Settings: A Comprehensive Guide"
|
||||
date = 2023-09-18
|
||||
updated = 2023-11-24
|
||||
updated = 2023-12-04
|
||||
description = "Discover the many ways you can customise your tabi site."
|
||||
|
||||
[taxonomies]
|
||||
@ -444,6 +444,14 @@ For more information, including instructions on how to create a custom subset, s
|
||||
|
||||
By default, the Atom feed only contains the summary/description of your posts. You can include the entire posts' content by setting `full_content_in_feed = true` in `config.toml`.
|
||||
|
||||
### Hiding Content from Feed
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|:----:|:-------:|:-------------:|:-----------------:|:-------------------:|
|
||||
| ✅ | ✅ | ✅ | ✅ | ❌ |
|
||||
|
||||
You can hide specific pages or entire sections from your feed by setting `hide_from_feed = true`.
|
||||
|
||||
### Comments {#adding-comments}
|
||||
|
||||
| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript |
|
||||
|
@ -1,4 +1,7 @@
|
||||
+++
|
||||
render = false
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
hide_from_feed = true
|
||||
+++
|
||||
|
@ -1,4 +1,7 @@
|
||||
+++
|
||||
render = false
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
hide_from_feed = true
|
||||
+++
|
||||
|
@ -1,4 +1,7 @@
|
||||
+++
|
||||
render = false
|
||||
insert_anchor_links = "left"
|
||||
|
||||
[extra]
|
||||
hide_from_feed = true
|
||||
+++
|
||||
|
@ -1,4 +1,5 @@
|
||||
{%- import "macros/translate.html" as macros_translate -%}
|
||||
{%- import "macros/settings.html" as macros_settings -%}
|
||||
{#- Load the internationalisation data -#}
|
||||
{%- set language_strings = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%}
|
||||
{%- if not language_strings -%}
|
||||
@ -44,6 +45,9 @@
|
||||
<updated>{{ last_updated | date(format="%+") }}</updated>
|
||||
<id>{{ feed_url | safe }}</id>
|
||||
{%- for page in pages %}
|
||||
{%- if macros_settings::evaluate_setting_priority(setting="hide_from_feed", page=page, default_global_value=false) == "true" -%}
|
||||
{%- continue -%}
|
||||
{%- endif -%}
|
||||
<entry xml:lang="{{ page.lang }}">
|
||||
<title>{{ page.title }}</title>
|
||||
<published>{{ page.date | date(format="%+") }}</published>
|
||||
|
Loading…
x
Reference in New Issue
Block a user