create an example folder

This commit is contained in:
2020-12-09 17:11:47 +01:00
parent c70307e999
commit 6f6c856229
11 changed files with 99 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>My blog</title>
<subtitle>Les gentils du net</subtitle>
<link href="gemini://example.com/atom.xml" rel="self"/>
<link href="gemini://example.com" rel="alternate"/>
<updated>{{ now().strftime('%FT%TZ') }}</updated>
<author>
<name>raspbeguy</name>
</author>
<category term="tech" />
<id>gemini://example.com</id>
{%- for post in posts|sort(attribute="date",reverse=True) %}
<entry>
<title>{{ post.title }}</title>
<id>gemini://example.com/{{ post.path }}</id>
<link href="gemini://example.com/{{ post.path }}" rel="alternate"/>
<updated>{{ post.date.strftime('%FT%TZ') }}</updated>
<published>{{ post.date.strftime('%FT%TZ') }}</published>
<author>
<name>{{ post.author.name }}</name>
</author>
{%- for tag in post.tags %}
<category term="{{ tag.name }}"/>
{%- endfor %}
</entry>
{%- endfor %}
</feed>

View File

@@ -0,0 +1,5 @@
# Posts by {{ prop_item.name }}
{% for post in prop_item.posts|sort(attribute="date",reverse=True) -%}
=> /{{ post.path }} [{{ post.date.strftime('%d/%m/%Y') }}] {{ post.title }}
{% endfor %}

View File

@@ -0,0 +1,5 @@
# Authors list
{% for author, value in prop.items()|sort(attribute='1.name') -%}
=> /authors/{{ author }}.gmi {{ value.name }} ({{ value.posts | length }} articles)
{% endfor %}

View File

@@ -0,0 +1,18 @@
# My blog
## I deserve all your attention.
This is my blog. Please read it and like it.
Last posts :
{% for post in (posts|sort(attribute="date",reverse=True))[:30] -%}
=> /{{ post.path }} {{ post.date.strftime('%Y-%m-%d') }} - {{ post.title }}
{% endfor %}
=> /posts.gmi All posts
=> /tags.gmi Tag list
=> /authors.gmi Authors list
=> /atom.xml Atom feed
This capsule has been generated by Geminer.
=> https://git.gugod.fr/raspbeguy/geminer Dépôt de Geminer

View File

@@ -0,0 +1,14 @@
# {{ post.title }}
by {{ post.author.name }}, on {{ post.date.strftime('%d %B %Y') }}
{% set tags = [] %}{% for tag in post.tags %}{{ tags.append(tag.name) or "" }}{% endfor %}{{ tags|join(", ") }}
{{ post.content }}
=> / Back to home
=> /authors/{{ post.author.slug }}.gmi More posts by {{ post.author.name }}
Posts having those tags:
{% for tag in post.tags|sort(attribute="name") -%}
=> /tags/{{ tag.slug }}.gmi {{ tag.name }}
{% endfor %}

View File

@@ -0,0 +1,5 @@
# Posts list
{% for post in posts|sort(attribute="date",reverse=True) -%}
=> /{{ post.path }} [{{ post.date.strftime('%d/%m/%Y') }}] {{ post.title }}
{% endfor %}

View File

@@ -0,0 +1,5 @@
# Posts with tag "{{ prop_item.name }}"
{% for post in prop_item.posts|sort(attribute="date",reverse=True) -%}
=> /{{ post.path }} [{{ post.date.strftime('%d/%m/%Y') }}] {{ post.title }}
{% endfor %}

View File

@@ -0,0 +1,5 @@
# Tags list
{% for tag, value in prop.items()|sort(attribute='1.name') -%}
=> /tags/{{ tag }}.gmi {{ value.name }} ({{ value.posts | length }} articles)
{% endfor %}