|
@@ -100,6 +100,7 @@ class Template:
|
|
main = load_template("main")
|
|
main = load_template("main")
|
|
quote = load_template("quote")
|
|
quote = load_template("quote")
|
|
list = load_template("list")
|
|
list = load_template("list")
|
|
|
|
+ textpage = load_template("textpage")
|
|
|
|
|
|
|
|
|
|
def main():
|
|
def main():
|
|
@@ -156,7 +157,7 @@ def main():
|
|
'opengraph': {
|
|
'opengraph': {
|
|
'title': f'quote:{short_hash}',
|
|
'title': f'quote:{short_hash}',
|
|
'url': f'/quote/{short_hash}/',
|
|
'url': f'/quote/{short_hash}/',
|
|
- 'description': f'{q.content}\n—{q.author}',
|
|
|
|
|
|
+ 'description': f'{q.content}\n—{q.author}',
|
|
},
|
|
},
|
|
})
|
|
})
|
|
with Path.write('quotes', uuid, 'index.html') as f:
|
|
with Path.write('quotes', uuid, 'index.html') as f:
|
|
@@ -201,7 +202,7 @@ def main():
|
|
with open(Path.data('works', slug, work, 'metadata.yaml')) as f:
|
|
with open(Path.data('works', slug, work, 'metadata.yaml')) as f:
|
|
meta = yaml.safe_load(f)
|
|
meta = yaml.safe_load(f)
|
|
with open(Path.data('works', slug, work, 'text')) as f:
|
|
with open(Path.data('works', slug, work, 'text')) as f:
|
|
- text = markdown.markdown(f.read(), extensions=['footnotes'])
|
|
|
|
|
|
+ text = Template.textpage({'contents': markdown.markdown(f.read(), extensions=['footnotes'])})
|
|
w = Work(
|
|
w = Work(
|
|
slug=meta.get('slug', work),
|
|
slug=meta.get('slug', work),
|
|
category=meta.get('category', slug),
|
|
category=meta.get('category', slug),
|