[website] parse markdown

This commit is contained in:
Rushabh Mehta 2015-03-11 11:48:37 +05:30
parent e77d2e360f
commit 2607fc08b8

View file

@ -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"] = ""