Add ability to hide blog posts from the listing
This website needs some work...
This commit is contained in:
parent
dfcd75fc08
commit
21ebf1ccf8
@ -3,6 +3,7 @@ title: Website update
|
||||
author: flewkey
|
||||
timestamp: 1593548958
|
||||
license: CC-BY
|
||||
visibility: hidden
|
||||
|
||||
I like blogs. Blogs are one of the only suitable platforms for people to
|
||||
properly present ideas. There are no character limits, the author can embed
|
||||
|
@ -14,8 +14,9 @@ def gen_list(files, ext, limit=-1, mini=False):
|
||||
for post in files:
|
||||
with open("posts/"+post, "r", encoding="utf-8") as file_in:
|
||||
html = md.convert(file_in.read())
|
||||
md.Meta["template"] = "post_preview" if not mini else "post_preview_mini"
|
||||
items += template(escape_braces(html), "blog/"+post[:-3]+ext, ext, md.Meta)
|
||||
if "visibility" not in md.Meta or md.Meta["visibility"] == "hidden":
|
||||
md.Meta["template"] = "post_preview" if not mini else "post_preview_mini"
|
||||
items += template(escape_braces(html), "blog/"+post[:-3]+ext, ext, md.Meta)
|
||||
i += 1
|
||||
if limit >= 0 and i >= limit:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user