1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 20:52:43 +00:00

improved default template

This commit is contained in:
Bastian Venthur
2022-07-01 12:44:23 +02:00
parent 6d82d2ab79
commit 10bac5531f
5 changed files with 44 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## unreleased
* improved default template
## [1.3.2] - 2022-06-29
* Added --version option

View File

@@ -7,6 +7,11 @@
{% if entry.title %}
<h1><a href="{{entry.dst}}">{{entry.title}}</a></h1>
{% if entry.description %}
<p>— {{ entry.description }}</p>
{% endif %}
{% endif %}
<p>Written on {{ entry.date.date() }}.</p>

View File

@@ -3,5 +3,26 @@
{% block title %}{{ title }}{% endblock %}
{% block content %}
{{ content }}
{% if title %}
<h2>{{ title }}</h2>
{% endif %}
<aside>
<p>published on {{ date.date() }}
{% if tags %}
· tagged with
{% for tag in tags|sort(case_sensitive=true) %}
{%- if not loop.first and not loop.last %}, {% endif -%}
{%- if loop.last and not loop.first %} and {% endif %}
<a href="/tags/{{ tag }}.html">#{{ tag }}</a>
{%- endfor %}
{% endif %}
</p>
</aside>
{{ content }}
{% endblock %}

View File

@@ -7,16 +7,20 @@
<meta name="author" content="{{ site.author }}">
{%- if description %}
<meta name="description" content="{{ description }}">
{% endif %}
<title>{% block title %}{% endblock %}</title>
{%- else %}
<meta name="description" content="{{ site.description }}">
{%- endif %}
<title>{% block title %}{% endblock %} | {{ site.description }}</title>
</head>
<body>
<header>
<h1>A Blog</h1>
<h1><a href="/">{{ site.title }}</a></h1>
<nav>
<h2>{{ site.description }}</h2>
<ul>
<li><a href="/">Blog</a></li>
<li><a href="/tags/">Tags</a></li>
<li><a href="/atom.xml">Atom Feed</a></li>
</ul>
</nav>
@@ -26,6 +30,7 @@
{% block content %}
{% endblock %}
</main>
</body>
</html>

View File

@@ -7,6 +7,11 @@
{% if entry.title %}
<h1><a href="/{{entry.dst}}">{{entry.title}}</a></h1>
{% if entry.description %}
<p>— {{ entry.description }}</p>
{% endif %}
{% endif %}
<p>Written on {{ entry.date.date() }}.</p>