[website] parse markdown
This commit is contained in:
parent
e77d2e360f
commit
2607fc08b8
1 changed files with 6 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ from frappe import _
|
|||
from frappe.website.utils import scrub_relative_urls
|
||||
from jinja2.utils import concat
|
||||
from jinja2 import meta
|
||||
from markdown2 import markdown
|
||||
import re
|
||||
|
||||
def render_blocks(context):
|
||||
|
|
@ -48,6 +49,11 @@ def render_blocks(context):
|
|||
if "title" not in out:
|
||||
out["title"] = context.get("title")
|
||||
|
||||
# markdown
|
||||
if "<!-- title -->" in out.get("content", ""):
|
||||
out["content"] = markdown(out["content"])
|
||||
|
||||
|
||||
# header
|
||||
if out["no_header"]:
|
||||
out["header"] = ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue