fix: Style

This commit is contained in:
Faris Ansari 2020-04-25 20:51:29 +05:30
parent 42586041c1
commit 9c7f01b59d
3 changed files with 4 additions and 5 deletions

View file

@ -223,7 +223,7 @@ def add_metatags(context):
tags = frappe._dict(context.get("metatags") or {})
if tags:
if not "og:type" in tags:
if "og:type" not in tags:
tags["og:type"] = "article"
name = tags.get('name') or tags.get('title')

View file

@ -69,8 +69,7 @@ class WebPage(WebsiteGenerator):
is_jinja = context.dynamic_template or "<!-- jinja -->" in context.main_section
if is_jinja or ("{{" in context.main_section):
try:
context["main_section"] = render_template(context.main_section,
context)
context["main_section"] = render_template(context.main_section, context)
if not "<!-- static -->" in context.main_section:
context["no_cache"] = 1
except TemplateSyntaxError:

View file

@ -203,7 +203,7 @@ def build_page(path):
html = html.replace('{next}', get_next_link(context.route))
if '<!-- tailwind-styles -->' in html and not frappe.conf.developer_mode:
html = add_processed_tailwind_css(context, html)
html = add_processed_tailwind_css(html)
# html = frappe.get_template(context.base_template_path).render(context)
@ -354,7 +354,7 @@ def raise_if_disabled(path):
if path == _path and not r.enabled:
raise frappe.PermissionError
def add_processed_tailwind_css(context, html):
def add_processed_tailwind_css(html):
from subprocess import Popen, PIPE
replace_string = '<!-- tailwind-styles -->'