Add links, posts specific feeds to header metadata

This commit is contained in:
jultty 2024-08-20 04:15:43 -03:00
commit 14faa87b5b
4 changed files with 27 additions and 6 deletions

View file

@ -3,13 +3,14 @@
A responsive, bilingual, RSS-ready and system-themed blog with zero lines of JavaScript powered by the [Zola](https://getzola.org) static site engine.
## Next
- [ ] Add source code link on homepage
- [ ] Columnar widescreen articles
- [ ] Add footers to more pages
- [ ] Add tags
- [ ] Check if localized page exists before opening it with the language selector
- [ ] Add links RSS feed to header metadata
## Done
- [x] Add links RSS feed to header metadata
- [x] Columnar widescreen articles
- [x] Check if localized page exists before opening it with the language selector
- [x] Add source code link on homepage
- [x] Improve mobile responsiveness
- [x] Light mode
- [x] Set page titles dynamically

View file

@ -43,9 +43,19 @@
<meta property="og:image" content="{{ get_url(path="assets/img/icons/kitty/kitty_circle_192.png") }}" />
{% block rss -%}
<link rel="alternate" type="application/rss+xml" title="RSS ({{ lang }})" href="{{ get_url(path="rss.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="Atom ({{ lang }})" href="{{ get_url(path="atom.xml", lang=lang, trailing_slash=false) }}">
{%- if lang == "pt" %}
{%- set locale_all_content = "Todo o conteúdo" %}
{%- set locale_language_name = "Português" %}
{% else %}
{%- set locale_all_content = "All content" %}
{%- set locale_language_name = "English" %}
{%- endif %}
<link rel="alternate" type="application/rss+xml" title="{{ locale_all_content }}: {{ locale_language_name }} (RSS)" href="{{ get_url(path="rss.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="{{ locale_all_content }}: {{ locale_language_name }} (Atom)" href="{{ get_url(path="atom.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="Posts: {{ locale_language_name }} (RSS)" href="{{ get_url(path="posts/rss.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="Posts: {{ locale_language_name }} (Atom)" href="{{ get_url(path="posts/atom.xml", lang=lang, trailing_slash=false) }}">
{%- endblock %}
{%- block extra_head %}{% endblock %}
</head>
<body>

View file

@ -1,5 +1,10 @@
{% extends "base.html" %}
{%- block extra_head %}
<link rel="alternate" type="application/rss+xml" title="Links (RSS)" href="http://127.0.0.1:1111/links/rss.xml">
<link rel="alternate" type="application/rss+xml" title="Links (Atom)" href="http://127.0.0.1:1111/links/atom.xml">
{%- endblock %}
{%- block content %}
<h1 id="post-title"><a href="{{ page.extra.url }}">{{ page.title }}</a></h1>
<time class="link-date"><strong>Linked {{ page.date }}</strong></time>

View file

@ -1,5 +1,10 @@
{% extends "base.html" %}
{%- block extra_head %}
<link rel="alternate" type="application/rss+xml" title="Links (RSS)" href="http://127.0.0.1:1111/links/rss.xml">
<link rel="alternate" type="application/rss+xml" title="Links (Atom)" href="http://127.0.0.1:1111/links/atom.xml">
{%- endblock %}
{%- block content %}
{%- set english_section = get_section(path="links/_index.md", lang="en") %}
<h1 class="title">{{ section.title }}</h1>