Commit e68407a2 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revised the documentation layout.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 24f1486c
.wy-nav-content {
max-width: 1200px !important;
}
......@@ -13,14 +13,14 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another
# directory, 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 os
import sys
sys.path.insert(0, os.path.abspath('..'))
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
......@@ -40,12 +40,22 @@ import gms_preprocessing
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.todo', 'sphinxarg.ext']
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.githubpages',
'sphinx.ext.viewcode',
'sphinx.ext.todo',
'sphinxarg.ext',
'sphinx_autodoc_typehints',
'sphinx.ext.intersphinx'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
......@@ -56,7 +66,8 @@ master_doc = 'index'
# General information about the project.
project = u'gms_preprocessing'
copyright = u"2017, Daniel Scheffler"
copyright = u"2017-2020, Daniel Scheffler"
author = u"Daniel Scheffler"
# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
......@@ -69,7 +80,10 @@ release = gms_preprocessing.__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:
......@@ -79,7 +93,8 @@ release = gms_preprocessing.__version__
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# This patterns also effect to html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The reST default role (used for this markup: `text`) to use for all
# documents.
......@@ -106,17 +121,52 @@ pygments_style = 'sphinx'
# documents.
#keep_warnings = False
# Define how to document class docstrings
# '__init__' documents only the __init__ methods, 'class' documents only the class methods and 'both' documents both
autoclass_content = 'both'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# Apply custom sphinx styles (e.g., increase content width of generated docs)
def setup(app):
app.add_css_file('custom.css')
# Add mappings for intersphinx extension (allows to link to the API reference of other sphinx documentations)
intersphinx_mapping = {
'geoarray': ('http://danschef.gitext.gfz-potsdam.de/geoarray/doc/', None),
'python': ('http://docs.python.org/3', None),
}
# -- Options for HTML output -------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# html_theme = 'default'
html_theme = 'sphinx_rtd_theme' # The one installed via pip install sphinx_rtd_theme in the .gitlab.yml
# 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
# documentation.
#html_theme_options = {}
html_theme_options = {
'canonical_url': '',
'analytics_id': '',
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': 'view',
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
'set_type_checking_flag': True # option of sphinx_autodoc_typehints extension
}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
......@@ -202,13 +252,16 @@ latex_elements = {
# 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]).
# [howto, manual, or own class]).
latex_documents = [
('index', 'gms_preprocessing.tex',
(master_doc, 'gms_preprocessing.tex',
u'gms_preprocessing Documentation',
u'Daniel Scheffler', 'manual'),
]
......@@ -239,9 +292,9 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'gms_preprocessing',
(master_doc, 'gms_preprocessing',
u'gms_preprocessing Documentation',
[u'Daniel Scheffler'], 1)
[author], 1)
]
# If true, show URL addresses after external links.
......@@ -254,9 +307,9 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'gms_preprocessing',
(master_doc, 'gms_preprocessing',
u'gms_preprocessing Documentation',
u'Daniel Scheffler',
author,
'gms_preprocessing',
'One line description of project.',
'Miscellaneous'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment