summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2022-12-24 18:10:17 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2022-12-24 18:10:17 +0000
commit54ac714da7175a8a08239e500a4e75a48b97d97e (patch)
tree8fa4bb4e7d37f2b6eff7068d47a58ca2ad93f18d /templates
downloadblog-54ac714da7175a8a08239e500a4e75a48b97d97e.tar.gz
blog-54ac714da7175a8a08239e500a4e75a48b97d97e.tar.bz2
blog-54ac714da7175a8a08239e500a4e75a48b97d97e.zip
Initial version of generator
Generation of feed page and post pages are supported. Markdown to html conversion seems working. At least there is nothing strange with hello-world example.
Diffstat (limited to 'templates')
-rw-r--r--templates/feed.html23
-rw-r--r--templates/post.html17
2 files changed, 40 insertions, 0 deletions
diff --git a/templates/feed.html b/templates/feed.html
new file mode 100644
index 0000000..ee1411e
--- /dev/null
+++ b/templates/feed.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+
+<html>
+
+<head>
+ <meta charset="UTF-8">
+ <title>Blog</title>
+</head>
+
+<body>
+ {% if posts %}
+ <ul>
+ {% for post in posts %}
+ <li>
+ <a href="{{ post.name }}">{{ post.metadata.title }}</a>
+ ({{ post.metadata.date }})
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+</body>
+
+</html>
diff --git a/templates/post.html b/templates/post.html
new file mode 100644
index 0000000..088b2f6
--- /dev/null
+++ b/templates/post.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+
+<html>
+
+<head>
+ <meta charset="UTF-8">
+ <title>{{ title }}</title>
+</head>
+
+<body>
+ <h1>{{ title }}</h1>
+ <h3>{{ date }}</h3>
+
+ {{ body|safe }}
+</body>
+
+</html>