mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-12-06 17:27:57 +00:00
date in PDF output
This commit is contained in:
@@ -342,6 +342,7 @@ def render_pages(target=None, for_pdf=False, bypass_errors=False):
|
|||||||
else:
|
else:
|
||||||
html_content = ""
|
html_content = ""
|
||||||
|
|
||||||
|
current_time = time.strftime("%B %d, %Y")
|
||||||
if "template" in currentpage:
|
if "template" in currentpage:
|
||||||
# Use a template other than the default one
|
# Use a template other than the default one
|
||||||
template = env.get_template(currentpage["template"])
|
template = env.get_template(currentpage["template"])
|
||||||
@@ -357,13 +358,15 @@ def render_pages(target=None, for_pdf=False, bypass_errors=False):
|
|||||||
categories=categories,
|
categories=categories,
|
||||||
pages=pages,
|
pages=pages,
|
||||||
content=html_content,
|
content=html_content,
|
||||||
target=target)
|
target=target,
|
||||||
|
current_time=current_time)
|
||||||
else:
|
else:
|
||||||
out_html = default_template.render(currentpage=currentpage,
|
out_html = default_template.render(currentpage=currentpage,
|
||||||
categories=categories,
|
categories=categories,
|
||||||
pages=pages,
|
pages=pages,
|
||||||
content=html_content,
|
content=html_content,
|
||||||
target=target)
|
target=target,
|
||||||
|
current_time=current_time)
|
||||||
|
|
||||||
# Experimental: replace links in full HTML, not just content
|
# Experimental: replace links in full HTML, not just content
|
||||||
soup = BeautifulSoup(out_html, "html.parser")
|
soup = BeautifulSoup(out_html, "html.parser")
|
||||||
|
|||||||
@@ -45,5 +45,7 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<footer>(Exported {{ current_time }})
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user