Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ Additional options for the theme. The default theme ``simplepdf_theme`` inherits
``simplepdf_theme`` options:

:nocover: Do not display cover pages (front and back cover)
:notoc: Do not display the Table of Contents page


simplepdf_weasyprint_filter
Expand Down
3 changes: 2 additions & 1 deletion sphinx_simplepdf/themes/simplepdf_theme/page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{%- extends "layout.html" %}
{%- set render_cover = (not theme_nocover|tobool) %}
{%- set render_toc = (not theme_notoc|tobool) %}

{%- block extrahead %}

Expand All @@ -8,7 +9,7 @@
{%- if render_cover %}
{%- include "cover.html" -%}
{%- endif %}
{{ sidebar() }}
{%- if render_toc %}{{ sidebar() }}{%- endif %}
{% endblock %}
{% block body %}
{{ body }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
}

// .. toctree:: config
@if not $notoc {
.sphinxsidebarwrapper {

page-break-before: always;
Expand Down Expand Up @@ -159,3 +160,4 @@
}
}
}
} // @if not $notoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ $bottom-center-content: config('bottom-center-content', '') !default;
$bottom-right-content: config('bottom-right-content', '') !default;

$nocover: theme_option('nocover', false) !default;
$notoc: theme_option('notoc', false) !default;
1 change: 1 addition & 0 deletions sphinx_simplepdf/themes/simplepdf_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ globaltoc_collapse = false
globaltoc_includehidden = false
globaltoc_maxdepth = 1
nocover = false
notoc = false