create an example folder
This commit is contained in:
28
example/templates/atom.tpl
Normal file
28
example/templates/atom.tpl
Normal 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>
|
||||
5
example/templates/author.tpl
Normal file
5
example/templates/author.tpl
Normal 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 %}
|
||||
5
example/templates/authors_index.tpl
Normal file
5
example/templates/authors_index.tpl
Normal 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 %}
|
||||
18
example/templates/index.tpl
Normal file
18
example/templates/index.tpl
Normal 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
|
||||
14
example/templates/post.tpl
Normal file
14
example/templates/post.tpl
Normal 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 %}
|
||||
5
example/templates/posts_list.tpl
Normal file
5
example/templates/posts_list.tpl
Normal 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 %}
|
||||
5
example/templates/tag.tpl
Normal file
5
example/templates/tag.tpl
Normal 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 %}
|
||||
5
example/templates/tags_index.tpl
Normal file
5
example/templates/tags_index.tpl
Normal 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 %}
|
||||
Reference in New Issue
Block a user