From bbb1fa88e926395ef377635122dd34dbae895e77 Mon Sep 17 00:00:00 2001 From: Sean Dockray Date: Sat, 6 Jun 2020 23:46:32 +1000 Subject: [PATCH] escaping YAML header problems --- custom_syadmin/build_from_notion.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/custom_syadmin/build_from_notion.py b/custom_syadmin/build_from_notion.py index 332b66d..42e73c6 100644 --- a/custom_syadmin/build_from_notion.py +++ b/custom_syadmin/build_from_notion.py @@ -123,7 +123,8 @@ def yaml_home(record): """ YAML template for syllabus home page """ topics = [ f"{t.slug}.md" for t in record["related_to_syllabus_topics_syllabus"]] return """--- -title: %s +title: > + %s has_topics: %s ---\n\n""" % ( record["name"], @@ -135,7 +136,8 @@ def yaml_topic(record): """ YAML template for topic """ sessions = [ f"{s.slug}.md" for s in record["related_to_syllabus_sessions_topic"]] return """--- -title: %s +title: > + %s has_sessions: %s ---\n\n""" % ( record["name"], @@ -146,7 +148,8 @@ has_sessions: %s def yaml_default(record): """ YAML template default """ return """--- -title: %s +title: > + %s ---\n\n""" % ( record["name"] )