@@ 2,6 2,7 @@ from .database.filerepository import get
from .database.article_factory import build_from_posix_file, build_from_posix_files
from .database.markdown import get_html
from math import ceil
+from os import environ
from flask import Flask, render_template, abort, request
app = Flask(__name__)
@@ 26,3 27,7 @@ def article_show(id):
abort(404)
return render_template('show.html', article=article)
+
+@app.template_filter('env')
+def env_filter(key, default):
+ return environ.get(key, default)
@@ 9,7 9,7 @@
<body>
<div class="container">
<div class="page-title">
- <h1>The Eddie Barraco's blog</h1>
+ <h1>The {{ 'OWNER_NAME' | env('OWNER NAME') }}'s blog</h1>
</div>
<div class="content">
<article>