app: add rendering of markdown
Add rendering of markdown files stored in the pages directory using templates in the templates directory. Signed-off-by: Johannes Thumshirn <jth@kernel.org>pull/1/head
parent
aa829dd3fb
commit
4e599be173
@ -0,0 +1,6 @@
|
|||||||
|
title: Post title goes here
|
||||||
|
date: 25 Feb 21
|
||||||
|
author: Me
|
||||||
|
description: Hello World
|
||||||
|
|
||||||
|
Hello World
|
@ -0,0 +1,9 @@
|
|||||||
|
{% extends "template.html" %}
|
||||||
|
{% block content %}
|
||||||
|
{% for page in pages %}
|
||||||
|
<a href="{{ page.path }}.html"><h2>{{ page.title }}</h2></a>
|
||||||
|
<p> {{ page.description }} </p>
|
||||||
|
<p> {{ page.date }} </p>
|
||||||
|
<hr>
|
||||||
|
{% endfor %}
|
||||||
|
{% endblock %}
|
@ -0,0 +1,6 @@
|
|||||||
|
{% extends "template.html" %}
|
||||||
|
{% block content %}
|
||||||
|
<h1>{{ page.title }}</h1>
|
||||||
|
<p>{{page.html|safe }}</p>
|
||||||
|
<strong>{{ page.author }}</strong> {{ page.date }}
|
||||||
|
{% endblock %}
|
@ -0,0 +1,3 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
{% block content %}
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue