Deprecate unused metadata
This commit is contained in:
parent
1a7c02ca64
commit
2149958767
30
build.py
30
build.py
|
@ -103,36 +103,6 @@ def main():
|
|||
page.title.string = meta_title[0]
|
||||
page.header.h1.string = meta_title[0]
|
||||
|
||||
if meta_date := meta.get("date"):
|
||||
p = page.new_tag("p")
|
||||
p["class"] = "metadata"
|
||||
p.string = "Date: " + meta_date[0]
|
||||
page.header.append(p)
|
||||
|
||||
if meta_author := meta.get("author"):
|
||||
p = page.new_tag("p")
|
||||
p["class"] = "metadata"
|
||||
p.string = "Author: " + meta_author[0]
|
||||
page.header.append(p)
|
||||
|
||||
if meta_source := meta.get("source"):
|
||||
for source_url in meta_source:
|
||||
a = page.new_tag("a")
|
||||
a["href"] = source_url
|
||||
a.string = source_url
|
||||
p = page.new_tag("p")
|
||||
p["class"] = "metadata"
|
||||
p.string = "URL: "
|
||||
p.append(a)
|
||||
page.header.append(p)
|
||||
|
||||
if meta_comment := meta.get("comment"):
|
||||
for comment in meta_comment:
|
||||
aside = page.new_tag("aside")
|
||||
html = bs4.BeautifulSoup(comment_md.convert(comment), features="html.parser")
|
||||
aside.extend(html.p.contents)
|
||||
page.header.append(aside)
|
||||
|
||||
# RSS metadata
|
||||
if "feed" in meta:
|
||||
pubdate = get_pubdate(path.as_posix())
|
||||
|
|
Loading…
Reference in New Issue