diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-05 17:33:09 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-05 17:33:09 -0700 |
commit | 562ee2b77fb3c1037d1f08abf85891c6dc6666db (patch) | |
tree | 2465f4ef5c3f2fd077e2381b7e4d37bc53a214fc | |
parent | 8b0f2f632950ee2441504ccad753ff673fccf0d6 (diff) | |
download | gitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.zip gitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.tar.gz gitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.tar.bz2 |
Add README introduction to page/pdf generation
-rw-r--r-- | theme/templates/page.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/theme/templates/page.html b/theme/templates/page.html index 731e4bc..a479884 100644 --- a/theme/templates/page.html +++ b/theme/templates/page.html @@ -41,6 +41,26 @@ </section> {# Pages content #} + <section> + <article class="new-chapter"> + <h1>Introduction</h1> + </article> + + <article id="#README.md"> + {% for section in pages["README.md"].content %} + {% if section.type == "normal" %} + {% autoescape false %}{{ section.content }}{% endautoescape %} + {% elif section.type == "exercise" %} + <div class="exercise"> + <div class="exercise-header">Exercise #{{ exercise }}</div> + {% autoescape false %}{{ section.content }}{% endautoescape %} + <pre><code>{% autoescape false %}{{ section.code.base|code }}{% endautoescape %}</code></pre> + {% set exercise = exercise + 1 %} + </div> + {% endif %} + {% endfor %} + </article> + </section> {% for item in summary.chapters %} {% if item.articles.length > 0 %} <section> |