Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit eafd290

Browse files
Consolidate template related path/name config options in conf.tmpl, improve documentation
1 parent cc579af commit eafd290

1 file changed

Lines changed: 22 additions & 28 deletions

File tree

runestone/common/project_template/conf.tmpl

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ extensions = ['sphinx.ext.mathjax'] + runestone_extensions()
3434

3535
#,'runestone.video','runestone.reveal','runestone.poll','runestone.tabbedStuff','runestone.disqus','runestone.codelens','runestone.activecode', 'runestone.assess', 'runestone.animation','runestone.meta', 'runestone.parsons', 'runestone.blockly', 'runestone.livecode','runestone.accessibility']
3636

37-
# This sets up your project to use the defaults. If you want to create a custom set of templates
38-
# for your own project you can over ride them by creating your own _templates folder
39-
templates_path = [pkg_resources.resource_filename('runestone', 'common/project_template/_templates')]
40-
4137
# The suffix of source filenames.
4238
source_suffix = '.rst'
4339

@@ -154,14 +150,22 @@ inline_highlight_literals = False
154150

155151
# -- Options for HTML output ---------------------------------------------------
156152

157-
# The theme to use for HTML and HTML Help pages. See the documentation for
158-
# a list of builtin themes.
153+
# The theme to use for HTML and HTML Help pages. sphinx_bootstrap is provided with
154+
# Runestone. Other themes are built into sphinx:
155+
# https://www.sphinx-doc.org/en/master/usage/theming.html?highlight=html_theme_path#using-a-theme
159156
html_theme = 'sphinx_bootstrap'
160157

158+
# If using a non-sphinx theme, the path to the theme folder must be in this list
159+
html_theme_path = [pkg_resources.resource_filename('runestone', 'common/project_template/_templates/plugin_layouts')]
160+
161+
# To override individual templates from the theme, you can make a directory and add its path
162+
# relative to this file to the templates_path list. In it, place copies of any template files
163+
# you wish to override - your template file(s) will be used instead of the default ones from the theme
164+
#templates_path = ['_templates']
165+
161166
# Theme options are theme-specific and customize the look and feel of a theme
162167
# further. For a list of options available for each theme, see the
163168
# documentation.
164-
#html_theme_options = {'nosidebar': 'true'}
165169
html_theme_options = {
166170
# Navigation bar title. (Default: ``project`` value)
167171
'navbar_title': "%(project_title)s",
@@ -203,11 +207,17 @@ html_theme_options = {
203207
#'bootswatch_theme': "slate",
204208
}
205209

210+
# Additional templates that should be rendered to pages, maps page names to
211+
# template names.
212+
# https://www.sphinx-doc.org/en/master/usage/configuration.html?highlight=html_sidebars#confval-html_additional_pages
213+
#html_additional_pages = {}
214+
215+
# A list of paths that contain custom static files (such as style sheets) here,
216+
# relative to this directory. They are copied after the builtin static files,
217+
# so a file named "default.css" will overwrite the builtin "default.css".
218+
# Example: html_static_path = runestone_static_dirs() + ['_static', 'other']
219+
html_static_path = runestone_static_dirs()
206220

207-
# This is set up to use the default runestone themes, you can override them by
208-
# creating your own folder and modifying this path.
209-
# Add any paths that contain custom themes here, relative to this directory.
210-
html_theme_path = [pkg_resources.resource_filename('runestone', 'common/project_template/_templates/plugin_layouts')]
211221
# List of extra stylesheets that should be added to all html pages
212222
# Files must be on a path contained in html_static_path
213223
#setup.custom_css_files = ["sample.css", "sample2.css"]
@@ -226,23 +236,14 @@ html_title = 'Runestone Interactive Overview'
226236
# A shorter title for the navigation bar. Default is the same as html_title.
227237
html_short_title ='Runestone Interactive Overview'
228238
229-
# The name of an image file (relative to this directory) to place at the top
230-
# of the sidebar.
231-
232-
# logo is included in layout file
239+
# Logo is included at the top of the page
233240
#html_logo = "../source/_static/logo_small.png"
234241
235242
# The name of an image file (within the static path) to use as favicon of the
236243
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
237244
# pixels large.
238245
#html_favicon = None
239246
240-
# Add any paths that contain custom static files (such as style sheets) here,
241-
# relative to this directory. They are copied after the builtin static files,
242-
# so a file named "default.css" will overwrite the builtin "default.css".
243-
244-
html_static_path = runestone_static_dirs()
245-
246247
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
247248
# using the given strftime format.
248249
#html_last_updated_fmt = '%%b %%d, %%Y'
@@ -251,13 +252,6 @@ html_static_path = runestone_static_dirs()
251252
# typographically correct entities.
252253
#html_use_smartypants = True
253254
254-
# Custom sidebar templates, maps document names to template names.
255-
#html_sidebars = {}
256-
257-
# Additional templates that should be rendered to pages, maps page names to
258-
# template names.
259-
#html_additional_pages = {}
260-
261255
# If false, no module index is generated.
262256
#html_domain_indices = True
263257

0 commit comments

Comments
 (0)