Commit 73a30beb authored by Blaise Thompson's avatar Blaise Thompson

Merge branch 'render_metadata' into 'master'

Render metadata in table at top of yeps

See merge request !49
parents 819d67e3 e90d875b
Pipeline #209447745 passed with stage
in 46 seconds
......@@ -39,6 +39,18 @@ class YEP:
post_history: [str]
content: str
@property
def metadata(self) -> str:
out = "<table>\n"
out += f"<tr><th>YEP:</th><td>{self.index}</td></tr>\n"
out += f"<tr><th>Title:</th><td>{self.title}</td></tr>\n"
out += f"<tr><th>Authors:</th><td>{', '.join(self.authors)}</td></tr>\n"
out += f"<tr><th>Status:</th><td>{self.status}</td></tr>\n"
out += f"<tr><th>Tags:</th><td>{', '.join(self.tags)}</td></tr>\n"
out += f"<tr><th>Post-History:</th><td>{', '.join(self.post_history)}</td></tr>\n"
out += "</table>\n"
return out
yeps = []
for yep in os.listdir(__here__ / "yeps"):
......
......@@ -10,6 +10,8 @@
{{ yep.title }}
</h1>
{{ yep.metadata }}
{{ yep.content }}
{% include "footer.html" %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment