added johnvertisement
This commit is contained in:
parent
52369e77b1
commit
6d08c5bf79
2 changed files with 24 additions and 12 deletions
|
@ -62,6 +62,7 @@ def index_blog(app):
|
|||
blogposts = []
|
||||
blog_dir = os.path.join(app.root_path, "blog")
|
||||
for file in os.listdir(blog_dir):
|
||||
try:
|
||||
with open(os.path.join(blog_dir, file)) as f:
|
||||
contents = f.read()
|
||||
html = markdown2.markdown(contents, extras=markdown_extras)
|
||||
|
@ -74,6 +75,8 @@ def index_blog(app):
|
|||
meta["n"] = int(date_parts[3])
|
||||
meta["url"] = f"/blog/{date.isoformat().replace('-','/')}/{meta['n']}"
|
||||
blogposts.append(meta)
|
||||
except Exception as e:
|
||||
print("Error indexing blog post %s: %s" % (file, e))
|
||||
return sorted(blogposts, key=lambda post:[post["date"], post["n"]], reverse=True)
|
||||
|
||||
def create_app():
|
||||
|
|
|
@ -48,4 +48,13 @@ It is built using the <a href="https://flask.palletsprojects.com/en/2.1.x/">Flas
|
|||
icons from <a href="https://useiconic.com/open">Open Iconic</a>.
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
<div style="color: var(--fg-faded); text-align: center;">johnvertisement</div>
|
||||
<p>
|
||||
<iframe src="https://john.citrons.xyz/embed?ref=trimill.xyz" style="margin-left:auto;display:block;margin-right:auto;max-width:732px;width:100%;height:94px;border:none;"></iframe>
|
||||
</p>
|
||||
|
||||
<br />
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in a new issue