Setup a Notes category

This commit is contained in:
jultty 2024-11-16 02:03:03 -03:00
commit f2e8988825
5 changed files with 53 additions and 0 deletions

7
content/notes/_index.md Normal file
View file

@ -0,0 +1,7 @@
+++
title = "Notes"
sort_by = "date"
template = "notes.html"
page_template = "note-page.html"
generate_feeds = true
+++

View file

@ -0,0 +1,7 @@
+++
title = "Notas"
sort_by = "date"
template = "notes.html"
page_template = "note-page.html"
generate_feeds = true
+++

View file

@ -52,6 +52,7 @@
{%- endif -%}
<link rel="alternate" type="application/rss+xml" title="{{ locale_all_content }} ({{ locale_language_name }})" href="{{ get_url(path="atom.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="Posts ({{ locale_language_name }})" href="{{ get_url(path="posts/atom.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="{% if lang == "pt" %}Notas{% else %}Notes{% endif %} ({{ locale_language_name }})" href="{{ get_url(path="notes/atom.xml", lang=lang, trailing_slash=false) }}">
<link rel="alternate" type="application/rss+xml" title="Links" href="{{ get_url(path="links/atom.xml", trailing_slash=false) }}">
{%- endblock %}
{%- block extra_head %}{% endblock %}
@ -74,6 +75,7 @@
<li><a id="home" href="{{ get_url(path="/") }}">Home</a></li>
{%- endif %}
<li><a href="{{ get_url(path="posts", lang=lang) }}">Posts</a></li>
<li><a href="{{ get_url(path="notes", lang=lang) }}">{% if lang == "pt" %}Notas{% else %}Notes{% endif %}</a></li>
<li><a href="{{ get_url(path="links", lang=lang) }}">Links</a></li>
<li><a href="{{ get_url(path="feeds", lang=lang) }}">RSS</a></li>
<li><a href="https://mastodon.bsd.cafe/@jutty">Mastodon</a></li>

24
templates/note-page.html Normal file
View file

@ -0,0 +1,24 @@
{% extends "base.html" %}
{% block content %}
<article class="blog-post">
<h1 id="post-title">{{ page.title }}</h1>
<time class="post-date">{{ page.date -}}</time>
{{ page.content | safe }}
</article>
{%- endblock content -%}
{%- block footer %}
<hr/>
<p class="footer-text">
{%- if lang == "pt" %}feito por{% else %}made by{% endif %} <a href="https://jutty.dev">jutty</a>
{% if lang == "pt" %}com{% else %}with{% endif %} <a href="https://www.getzola.org/">Zola</a>
&bullet; {% if lang != "pt" %}BSD-licensed{% endif %}
<a href="https://github.com/jultty/blog">{% if lang == "pt" %}código fonte{% else %}source code{% endif %}</a>
{% if lang == "pt" %}sob a licença BSD{% endif %}
&bullet; <a href="{{ get_url(path="acknowledgments") }}">{% if lang == "pt" %}créditos{% else %}acknowledgments{% endif %}</a>
<br/>
{% if lang == "pt" %}gerado em{% else %}built{% endif %} <time>{{ now(utc=true) | date(format="%Y-%m-%d %H:%M") }} UTC</time>,
{{ now(timestamp=true) }}{% if lang == "pt" %}&#xba; segundo não-bissexto da Era Unix{% else %} non-leap seconds since the Unix Epoch{% endif %}
</p>
{% endblock footer %}

13
templates/notes.html Normal file
View file

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block content %}
<h1 class="title">{{ section.title }}</h1>
<ul id="posts">
{%- for page in section.pages %}
<li>
<time class="post-date">{{ page.date }}</time>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
</li>
{%- endfor %}
</ul>
{%- endblock content %}