diff --git a/theme/templates/ebook/layout.html b/theme/templates/ebook/layout.html
new file mode 100644
index 000000000..76efdf6cc
--- /dev/null
+++ b/theme/templates/ebook/layout.html
@@ -0,0 +1,22 @@
+
+
+ {{ htmlSnippet("html:start")|default("") }}
+
+ {{ htmlSnippet("head:start")|default("") }}
+
{{ progress.current.title }}
{% for section in content %}
-
+
{% if section.type == "normal" %}
{% autoescape false %}{{ section.content }}{% endautoescape %}
{% elif section.type == "exercise" %}
@@ -25,7 +25,7 @@
{% elif section.type == "quiz" %}
{% include "./includes/quiz.html" with {section: section} %}
{% endif %}
-
+
{% endfor %}
{% endblock %}
diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html
index 53940f077..85388f9a8 100644
--- a/theme/templates/ebook/summary.html
+++ b/theme/templates/ebook/summary.html
@@ -1,4 +1,4 @@
-{% extends "../layout.html" %}
+{% extends "./layout.html" %}
{% block title %}Table of Contents | {{ title }}{% endblock %}