mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Store doc generation date once
This commit is contained in:
@@ -40,10 +40,9 @@ def make_renderer(template_path, link_parser_factory):
|
||||
template = env.get_template(template_name)
|
||||
static = make_static(level)
|
||||
root = make_root(level)
|
||||
currdate = time.strftime("%d/%m/%Y")
|
||||
|
||||
with open('build/' + output_path, 'w') as out:
|
||||
out.write(template.render(level=level, static=static, root=root, currdate=currdate, **kwargs))
|
||||
out.write(template.render(level=level, static=static, root=root, **kwargs))
|
||||
|
||||
return inner
|
||||
|
||||
@@ -152,6 +151,8 @@ if __name__ == '__main__':
|
||||
render('index.html', 'index.html', level=0, classes=classes)
|
||||
# Render the search index.
|
||||
render('search-index.js', 'search-index.js', level=0, classes=classes)
|
||||
# Render the date.
|
||||
render('date.js', 'date.js', level=0, currdate=time.strftime("%d/%m/%Y"))
|
||||
|
||||
for class_ in classes:
|
||||
print 'Rending pages for class {}...'.format(class_.name)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<script src="{{ static('jquery.js') }}"></script>
|
||||
<script src="{{ static('main.js') }}"></script>
|
||||
<script async src="{{ root('search-index.js') }}"></script>
|
||||
<center>Generated on {{ currdate }}</center>
|
||||
<center>Generated on <script src="{{ root('date.js') }}"></script></center>
|
||||
<center>©2016 - Eluna Lua Engine</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
1
docs/ElunaDoc/templates/date.js
Normal file
1
docs/ElunaDoc/templates/date.js
Normal file
@@ -0,0 +1 @@
|
||||
document.write("{{ currdate }}");
|
||||
Reference in New Issue
Block a user