escaping YAML header problems

This commit is contained in:
Sean Dockray 2020-06-06 23:46:32 +10:00
parent a892df3389
commit bbb1fa88e9
1 changed files with 6 additions and 3 deletions

View File

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