show which template renders a given page
Add a comment to every output page to show which template was used to render it to help someone trying to change the site figure out which file to edit. Change-Id: I08bbfb9bb355d170d9c5bbb085b03b2d54f1aefe Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -186,7 +186,10 @@ def main():
|
||||
raise
|
||||
|
||||
try:
|
||||
output = template.render(PROJECT_DATA=project_data)
|
||||
output = template.render(
|
||||
PROJECT_DATA=project_data,
|
||||
TEMPLATE_FILE=templateFile,
|
||||
)
|
||||
if templateFile.endswith('.html'):
|
||||
soup = BeautifulSoup(output, "lxml")
|
||||
output = soup.prettify()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
|
||||
<!-- TEMPLATE_FILE: openstack-manuals/www/{{TEMPLATE_FILE}} -->
|
||||
{% block header %}{% endblock %}
|
||||
<title>OpenStack Docs: {% block pagetitle %}{% endblock %}</title>
|
||||
<meta charset="utf-8">
|
||||
|
||||
Reference in New Issue
Block a user