Migrate to blag
- Convert old html blogposts to markdown - Organize things into blag's folder structure - Adjust html and css templates
This commit is contained in:
23
templates/archive.html
Normal file
23
templates/archive.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Archive{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% for entry in archive %}
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<time datetime="{{ entry.date }}">{{ entry.date.date() }}</time>
|
||||
<div>
|
||||
<h2><a href="{{ entry.dst }}">{{ entry.title }}</a></h2>
|
||||
{% if entry.description %}
|
||||
<p>— {{ entry.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
27
templates/article.html
Normal file
27
templates/article.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block 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 %}
|
||||
50
templates/base.html
Normal file
50
templates/base.html
Normal file
@@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="color-scheme" content="dark">
|
||||
<meta name="author" content="{{ site.author }}">
|
||||
{%- if description %}
|
||||
<meta name="description" content="{{ description }}">
|
||||
{%- else %}
|
||||
<meta name="description" content="{{ site.description }}">
|
||||
{%- endif %}
|
||||
<link rel="alternate" href="/atom.xml" type="application/atom+xml">
|
||||
<link rel="stylesheet" href="/css/style.css" type="text/css">
|
||||
<title>{% block title %}{% endblock %} | {{ site.description }}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1><a href="/">{{ site.title }}</a></h1>
|
||||
<nav>
|
||||
<h2>{{ site.description }}</h2>
|
||||
<ul>
|
||||
<li><h2><a href="/">Home</a></h2></li>
|
||||
<li><h2><a href="/love.html">A love note</a></h2></li>
|
||||
<li><h2><a href="/tags/">Tags</a></h2></li>
|
||||
<li><h2><a href="/archive.html">Archive</a></h2></li>
|
||||
<li><h2><a href="/contact.html">Contact</a></h2></li>
|
||||
<li><h2><a href="/about.html">About</a></h2></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
Subscribe to the <a href="/atom.xml">atom feed</a>.
|
||||
<br>
|
||||
<!-- Contact me via
|
||||
<a rel="me" href="https://mastodon.social/[FIXME]">[FIXME] Mastodon</a> or
|
||||
<a href="https://github.com/[FIXME]">[FIXME] Github</a>.
|
||||
</p> -->
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
25
templates/index.html
Normal file
25
templates/index.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ site.title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% for entry in archive[:15] %}
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<time datetime="{{ entry.date }}">{{ entry.date.date() }}</time>
|
||||
<div>
|
||||
<h2><a href="{{ entry.dst }}">{{ entry.title }}</a></h2>
|
||||
{% if entry.description %}
|
||||
<p>— {{ entry.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<p><a href="/archive.html">all articles...</a></p>
|
||||
|
||||
{% endblock %}
|
||||
9
templates/page.html
Normal file
9
templates/page.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% endblock %}
|
||||
25
templates/tag.html
Normal file
25
templates/tag.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}#{{ tag }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Articles tagged "{{ tag }}"</h2>
|
||||
|
||||
{% for entry in archive %}
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<time datetime="{{ entry.date }}">{{ entry.date.date() }}</time>
|
||||
<div>
|
||||
<h2><a href="../{{ entry.dst }}">{{ entry.title }}</a></h2>
|
||||
{% if entry.description %}
|
||||
<p>— {{ entry.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
14
templates/tags.html
Normal file
14
templates/tags.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Tags{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Tags</h2>
|
||||
<ul>
|
||||
{% for tag, size in tags %}
|
||||
<li>
|
||||
<a href="{{ tag }}.html">{{ tag }} ({{ size }} articles)</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user