mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-16 22:40:26 +00:00
chore: use new theme and clean up style errors
This commit is contained in:
parent
5e1193c0ee
commit
943a63fd84
1 changed files with 38 additions and 62 deletions
|
|
@ -1,13 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# 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.
|
||||
# Sphinx documentation generator configuration.
|
||||
#
|
||||
# More information on the configuration options is available at:
|
||||
# http://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import os
|
||||
import sys
|
||||
from typing import Dict
|
||||
|
||||
import django
|
||||
from django.conf import settings
|
||||
|
|
@ -27,7 +25,7 @@ settings.configure(
|
|||
'django.contrib.staticfiles',
|
||||
'eav',
|
||||
],
|
||||
SECRET_KEY=os.environ.get("DJANGO_SECRET_KEY", "this-is-not-s3cur3"),
|
||||
SECRET_KEY=os.environ.get('DJANGO_SECRET_KEY', 'this-is-not-s3cur3'),
|
||||
)
|
||||
|
||||
# Call django.setup to load installed apps and other stuff.
|
||||
|
|
@ -45,6 +43,18 @@ version = ''
|
|||
release = '0.10.0'
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""Use the configuration file itself as an extension."""
|
||||
app.connect(
|
||||
'autodoc-process-docstring',
|
||||
between(
|
||||
'^.*IGNORE.*$',
|
||||
exclude=True,
|
||||
),
|
||||
)
|
||||
return app
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
extensions = [
|
||||
|
|
@ -53,21 +63,18 @@ extensions = [
|
|||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.coverage',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx_rtd_theme',
|
||||
]
|
||||
|
||||
html_theme_options = dict(
|
||||
show_powered_by=False, show_related=True, fixed_sidebar=True, font_family='Roboto'
|
||||
)
|
||||
|
||||
templates_path = ['_templates']
|
||||
|
||||
source_suffix = '.rst'
|
||||
|
||||
master_doc = 'index'
|
||||
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
exclude_patterns = []
|
||||
exclude_patterns = ['build']
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
|
@ -75,66 +82,27 @@ pygments_style = 'sphinx'
|
|||
|
||||
# -- 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 = 'alabaster'
|
||||
|
||||
# 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 = 'sphinx_rtd_theme'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
# The default sidebars (for documents that don't match any pattern) are
|
||||
# defined by theme itself. Builtin themes are using these templates by
|
||||
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
|
||||
# 'searchbox.html']``.
|
||||
#
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file('styles.css')
|
||||
app.connect('autodoc-process-docstring', between('^.*IGNORE.*$', exclude=True))
|
||||
return app
|
||||
|
||||
|
||||
html_sidebars = {
|
||||
'index': ['sidebarintro.html', 'localtoc.html'],
|
||||
'**': ['sidebarintro.html', 'localtoc.html', 'relations.html', 'searchbox.html'],
|
||||
'**': [
|
||||
'sidebarintro.html',
|
||||
'localtoc.html',
|
||||
'relations.html',
|
||||
'searchbox.html',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
# -- Options for HTMLHelp output ---------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'DjangoEAV2doc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ------------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
latex_elements: Dict[str, str] = {}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
|
|
@ -148,7 +116,15 @@ latex_documents = [
|
|||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [(master_doc, 'djangoeav2', 'Django EAV 2 Documentation', [author], 1)]
|
||||
man_pages = [
|
||||
(
|
||||
master_doc,
|
||||
'djangoeav2',
|
||||
'Django EAV 2 Documentation',
|
||||
[author],
|
||||
1,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Texinfo output ----------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue