Added quickstart from blag
This commit is contained in:
parent
1c7cc625d5
commit
fba3ddb1a5
19 changed files with 607 additions and 8 deletions
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="light 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="/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="/">Blog</a></h2></li>
|
||||
<li><h2><a href="/archive.html">Archive</a></h2></li>
|
||||
<li><h2><a href="/tags/">Tags</a></h2></li>
|
||||
<li><h2><a href="/about.html">About Me</a></h2></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<p>This website was built with <a href="https://github.com/venthur/blag">blag</a>.
|
||||
<br>
|
||||
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 %}
|
Loading…
Add table
Add a link
Reference in a new issue