summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-05 17:33:09 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-05 17:33:09 -0700
commit562ee2b77fb3c1037d1f08abf85891c6dc6666db (patch)
tree2465f4ef5c3f2fd077e2381b7e4d37bc53a214fc
parent8b0f2f632950ee2441504ccad753ff673fccf0d6 (diff)
downloadgitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.zip
gitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.tar.gz
gitbook-562ee2b77fb3c1037d1f08abf85891c6dc6666db.tar.bz2
Add README introduction to page/pdf generation
-rw-r--r--theme/templates/page.html20
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>