From 529a2eb8086952f7cc6d4462bed16b8e5270f68f Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 9 Jun 2020 17:50:41 +0530 Subject: [PATCH] fix: condition for rendering source --- frappe/website/router.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/website/router.py b/frappe/website/router.py index 976bd9f3de..b291671a4a 100644 --- a/frappe/website/router.py +++ b/frappe/website/router.py @@ -278,10 +278,10 @@ def setup_source(page_info): if not page_info.base_template: page_info.base_template = get_base_template(page_info.route) - if page_info.template.endswith('.html') or page_info.template.endswith('.md'): + if page_info.template.endswith(('.html', '.md', )) and \ + '{%- extends' not in source and '{% extends' not in source: # set the source only if it contains raw content - if '{%- extends' not in source and '{% extends' not in source: - html = source + html = source # load css/js files js, css = '', ''