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