Skip to content

Commit

Permalink
Use RTD theme.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Dec 30, 2017
1 parent 8a8922d commit 7bfc248
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 188 deletions.
179 changes: 0 additions & 179 deletions conf.py

This file was deleted.

1 change: 1 addition & 0 deletions docs/books/computer-games/computer-space-games/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Computer Space Games

.. toctree::
:maxdepth: 1

starship-takeoff/index
intergalactic-games/index
evil-alien/index
Expand Down
28 changes: 19 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# yorkshire documentation build configuration file, created by
# yorkshire4 documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 30 11:31:29 2017.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -17,7 +17,7 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

Expand Down Expand Up @@ -46,7 +46,7 @@
master_doc = 'index'

# General information about the project.
project = 'yorkshire'
project = 'yorkshire4'
copyright = '2017, Russell Keith-Magee'
author = 'Russell Keith-Magee'

Expand Down Expand Up @@ -83,7 +83,17 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# on_rtd: whether we are on readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd: # only import and set the theme if we're building docs locally
try:
import sphinx_rtd_theme
except ModuleNotFoundError:
html_theme = 'default'
else:
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -112,7 +122,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'yorkshiredoc'
htmlhelp_basename = 'yorkshire4doc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -139,7 +149,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'yorkshire.tex', 'yorkshire Documentation',
(master_doc, 'yorkshire4.tex', 'yorkshire4 Documentation',
'Russell Keith-Magee', 'manual'),
]

Expand All @@ -149,7 +159,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'yorkshire', 'yorkshire Documentation',
(master_doc, 'yorkshire4', 'yorkshire4 Documentation',
[author], 1)
]

Expand All @@ -160,8 +170,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'yorkshire', 'yorkshire Documentation',
author, 'yorkshire', 'One line description of project.',
(master_doc, 'yorkshire4', 'yorkshire4 Documentation',
author, 'yorkshire4', 'One line description of project.',
'Miscellaneous'),
]

Expand Down

0 comments on commit 7bfc248

Please sign in to comment.