feat: give precedence to template
This commit is contained in:
parent
11ec3442a3
commit
892149af99
1 changed files with 3 additions and 4 deletions
|
|
@ -214,14 +214,13 @@ def build_page(path):
|
|||
|
||||
context = get_context(path)
|
||||
|
||||
if context.source:
|
||||
html = frappe.render_template(context.source, context)
|
||||
|
||||
elif context.template:
|
||||
if context.template:
|
||||
if path.endswith('min.js'):
|
||||
html = frappe.get_jloader().get_source(frappe.get_jenv(), context.template)[0]
|
||||
else:
|
||||
html = frappe.get_template(context.template).render(context)
|
||||
elif context.source:
|
||||
html = frappe.render_template(context.source, context)
|
||||
|
||||
if '{index}' in html:
|
||||
html = html.replace('{index}', get_toc(context.route))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue