diff --git a/docs/hacking-guide/en/_layouts/ebook/page.html b/docs/hacking-guide/en/_layouts/ebook/page.html
new file mode 100644
index 0000000000..51e2617c6a
--- /dev/null
+++ b/docs/hacking-guide/en/_layouts/ebook/page.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+
+{% block title %}{{ page.title }}{% endblock %}
+{% block description %}{{ page.description }}{% endblock %}
+
+{% block style %}
+ {### Include theme css before plugins css ###}
+ {% if not fileExists(config.styles.print) %}
+ {% if options.format %}
+
+ {% else %}
+
+ {% endif %}
+ {% endif %}
+
+ {{ super() }}
+
+ {### Custom stylesheets for the book ###}
+
+ {% for type, style in config.styles %}
+ {% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
+
+ {% endif %}
+ {% endfor %}
+{% endblock %}
+
+{% block body %}
+
+ {% block page %}
+
{{ page.title }}
+
+ {{ page.content|safe }}
+
+ {% endblock %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/docs/migration-guide/en/_layouts/ebook/page.html b/docs/migration-guide/en/_layouts/ebook/page.html
new file mode 100644
index 0000000000..51e2617c6a
--- /dev/null
+++ b/docs/migration-guide/en/_layouts/ebook/page.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+
+{% block title %}{{ page.title }}{% endblock %}
+{% block description %}{{ page.description }}{% endblock %}
+
+{% block style %}
+ {### Include theme css before plugins css ###}
+ {% if not fileExists(config.styles.print) %}
+ {% if options.format %}
+
+ {% block page %}
+
{{ page.title }}
+
+ {{ page.content|safe }}
+
+ {% endblock %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/docs/user-manual/en/_layouts/ebook/page.html b/docs/user-manual/en/_layouts/ebook/page.html
new file mode 100644
index 0000000000..51e2617c6a
--- /dev/null
+++ b/docs/user-manual/en/_layouts/ebook/page.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+
+{% block title %}{{ page.title }}{% endblock %}
+{% block description %}{{ page.description }}{% endblock %}
+
+{% block style %}
+ {### Include theme css before plugins css ###}
+ {% if not fileExists(config.styles.print) %}
+ {% if options.format %}
+
+ {% block page %}
+
{{ page.title }}
+
+ {{ page.content|safe }}
+
+ {% endblock %}
+
+{% endblock %}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2686996e50..1c71357935 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1678,6 +1678,7 @@