keywords: list = ["Undefined"],
date: str = "n.d.",
content: str = "",
- template: str = "page.html"
+ template: str = "page.html",
+ filename: str = ""
):
self.title = title
self.date = date
self.content = content
self.template = template
+ self.filename = filename
def from_metadata(self, metadata):
if "title" in metadata: self.title = metadata["title"].title()
date = self.date,
abstract = self.abstract,
keywords = format_keywords,
- content = self.content
+ content = self.content,
+ filename = self.filename
)
return Response(page, mimetype="text/html")
metadata = {k: v[0] for k, v in md.Meta.items()}
md.reset()
- page = Page(content = html)
+ page = Page(content = html, filename = title)
page.from_metadata(metadata)
return page.make()
<p>Abstract: <em>{{abstract}}</em></p>
{% endif %}
{% if keywords %}
- <p>Keywords: <em>{{keywords|safe}}<br><a href="/categories">See more keywords...</a></em></p>
+ <p>Keywords: <em>{{keywords|safe}}<br><a href="/categories">See more keywords...</a></em><br></p>
+ {% endif %}
+ {% if filename %}
+ <p><em><a href="https://git.ozva.co.uk/?p=blog;a=history;f=pages/{{filename|safe}}.md">See page history...</a></em></p>
{% endif %}
<hr>
<div>