Skip to content

Commit

Permalink
Update docs/conf.py and add theme override.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgilland committed Mar 23, 2018
1 parent 01f29dd commit 8ad699d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 16 deletions.
6 changes: 6 additions & 0 deletions docs/_static/theme_override.css
@@ -0,0 +1,6 @@

.wy-table-responsive table td,
.wy-table-responsive table th {
/* Get ride of nowrap for table cells. */
white-space: normal;
}
58 changes: 42 additions & 16 deletions docs/conf.py
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# omdb documentation build configuration file, created by
Expand Down Expand Up @@ -25,16 +26,16 @@
# 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.
sys.path.insert(0, os.path.abspath('..'))
import omdb

# -- General configuration ------------------------------------------------
import omdb as project_module

# -- General configuration ---------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
Expand All @@ -56,19 +57,24 @@
master_doc = 'index'

# General information about the project.
project = u'omdb'
copyright = u'2015, Derrick Gilland'
project = project_module.__package__
project_description = project_module.__description__
author = project_module.__author__
copyright = 'XXXX, {0}'.format(author)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = release = omdb.__version__
version = release = project_module.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down Expand Up @@ -104,6 +110,9 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- Options for HTML output ----------------------------------------------

Expand All @@ -113,9 +122,12 @@
html_theme = 'default'
else:
import sphinx_rtd_theme

html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

def setup(app):
app.add_stylesheet('theme_override.css')

# 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 @@ -192,9 +204,22 @@
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'omdbdoc'
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
#html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = project + 'doc'

# -- Options for LaTeX output ---------------------------------------------

Expand All @@ -207,14 +232,16 @@

# Additional stuff for the LaTeX preamble.
#'preamble': '',

# Latex figure (float) alignment
#'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'omdb.tex', u'omdb Documentation',
u'Derrick Gilland', 'manual'),
(master_doc, project + '.tex', project + ' Documentation', author, 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -243,8 +270,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'omdb', u'omdb Documentation',
[u'Derrick Gilland'], 1)
(master_doc, project, project + ' Documentation', [author], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -257,8 +283,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'omdb', u'omdb Documentation',
u'Derrick Gilland', 'omdb', 'One line description of project.',
(master_doc, project, project + ' Documentation',
author, project, project_description,
'Miscellaneous'),
]

Expand Down

0 comments on commit 8ad699d

Please sign in to comment.