added show_title frontmatter option
This commit is contained in:
parent
fc8897b71b
commit
99ad674f51
3 changed files with 8 additions and 0 deletions
|
@ -1,6 +1,10 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if metadata.show_title %}
|
||||
<center><h1>{{ metadata.title }}</h1></center>
|
||||
{% endif %}
|
||||
{{ content | safe }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% if metadata.show_title %}
|
||||
<center><h1>{{ metadata.title }}</h1></center>
|
||||
{% endif %}
|
||||
{% if metadata.date %}
|
||||
<center><small><time datetime="{{ metadata.date | safe }}">{{ metadata.date | safe}}</time></small></center>
|
||||
{% endif %}
|
||||
<article>{{ content | safe }}</article>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ class Metadata:
|
|||
title: str
|
||||
date: date
|
||||
description: str | None
|
||||
show_title: bool = True
|
||||
style: str | None = "/static/style.css"
|
||||
header: bool = True
|
||||
footer: bool = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue