From 562ee2b77fb3c1037d1f08abf85891c6dc6666db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Sat, 5 Apr 2014 17:33:09 -0700 Subject: [PATCH] Add README introduction to page/pdf generation --- theme/templates/page.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/theme/templates/page.html b/theme/templates/page.html index 731e4bcfa..a479884b9 100644 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -41,6 +41,26 @@ {# Pages content #} +
+
+

Introduction

+
+ +
+ {% for section in pages["README.md"].content %} + {% if section.type == "normal" %} + {% autoescape false %}{{ section.content }}{% endautoescape %} + {% elif section.type == "exercise" %} +
+
Exercise #{{ exercise }}
+ {% autoescape false %}{{ section.content }}{% endautoescape %} +
{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}
+ {% set exercise = exercise + 1 %} +
+ {% endif %} + {% endfor %} +
+
{% for item in summary.chapters %} {% if item.articles.length > 0 %}