summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2018-10-20 20:11:14 -0700
committerDavid Lord <davidism@gmail.com>2018-10-20 20:11:14 -0700
commit8c6f43dd17f6f7cefa3768f8b5db277490b4256e (patch)
treeb530fdfb193b56b851fa646f24fd2cdade150773
parent46750f44e3d59c039fc72a9035b0c9935ecaf992 (diff)
downloadmarkupsafe-8c6f43dd17f6f7cefa3768f8b5db277490b4256e.tar.gz
fix docs build
-rw-r--r--docs/Makefile3
-rw-r--r--docs/conf.py76
-rw-r--r--docs/make.bat1
-rw-r--r--docs/requirements.txt2
-rw-r--r--tox.ini8
5 files changed, 28 insertions, 62 deletions
diff --git a/docs/Makefile b/docs/Makefile
index d10ee88..5128596 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,7 +4,6 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
-SPHINXPROJ = MarkupSafe
SOURCEDIR = .
BUILDDIR = _build
@@ -17,4 +16,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/docs/conf.py b/docs/conf.py
index 0fe75a4..3753fde 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,72 +1,42 @@
-# -*- coding: utf-8 -*-
-from __future__ import print_function
-
-from pallets_sphinx_themes import ProjectLink, get_version
+from pallets_sphinx_themes import get_version
+from pallets_sphinx_themes import ProjectLink
# Project --------------------------------------------------------------
-project = 'MarkupSafe'
-copyright = '2010 Pallets team'
-author = 'Pallets team'
-release, version = get_version('MarkupSafe')
+project = "MarkupSafe"
+copyright = "2010 Pallets Team"
+author = "Pallets Team"
+release, version = get_version("MarkupSafe")
# General --------------------------------------------------------------
-master_doc = 'index'
-
-extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.intersphinx',
-]
-
-intersphinx_mapping = {
- 'python': ('https://docs.python.org/3/', None),
-}
+master_doc = "index"
+extensions = ["sphinx.ext.autodoc", "sphinx.ext.intersphinx", "pallets_sphinx_themes"]
+intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
# HTML -----------------------------------------------------------------
-html_theme = 'flask'
+html_theme = "flask"
+html_theme_options = {"index_sidebar_logo": False}
html_context = {
- 'project_links': [
- ProjectLink(
- 'Donate to Pallets',
- 'https://psfmember.org/civicrm/contribute/transact?reset=1&id=20'),
- ProjectLink(
- 'MarkupSafe Website', 'https://palletsprojects.com/p/markupsafe/'),
- ProjectLink('PyPI Releases', 'https://pypi.org/project/MarkupSafe/'),
- ProjectLink('Source Code', 'https://github.com/pallets/markupsafe/'),
- ProjectLink(
- 'Issue Tracker', 'https://github.com/pallets/MarkupSafe/issues/'),
- ],
+ "project_links": [
+ ProjectLink("Donate to Pallets", "https://palletsprojects.com/donate"),
+ ProjectLink("Website", "https://palletsprojects.com/p/MarkupSafe/"),
+ ProjectLink("PyPI releases", "https://pypi.org/project/MarkupSafe/"),
+ ProjectLink("Source Code", "https://github.com/pallets/markupsafe/"),
+ ProjectLink("Issue Tracker", "https://github.com/pallets/markupsafe/issues/"),
+ ]
}
html_sidebars = {
- 'index': [
- 'project.html',
- 'searchbox.html',
- ],
- '**': [
- 'localtoc.html',
- 'relations.html',
- 'searchbox.html',
- ]
+ "index": ["project.html", "localtoc.html", "searchbox.html"],
+ "**": ["localtoc.html", "relations.html", "searchbox.html"],
}
+singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
+html_title = "MarkupSafe Documentation ({})".format(version)
html_show_sourcelink = False
# LaTeX ----------------------------------------------------------------
latex_documents = [
- (
- master_doc, 'MarkupSafe.tex', 'MarkupSafe Documentation',
- 'Pallets team', 'manual'
- ),
+ (master_doc, "MarkupSafe-{}.tex".format(version), html_title, author, "manual")
]
-latex_use_modindex = False
-latex_elements = {
- 'papersize': 'a4paper',
- 'pointsize': '12pt',
-}
-latex_use_parts = True
-
-# linkcheck ------------------------------------------------------------
-
-linkcheck_anchors = False
diff --git a/docs/make.bat b/docs/make.bat
index 7639bf3..7893348 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -9,7 +9,6 @@ if "%SPHINXBUILD%" == "" (
)
set SOURCEDIR=.
set BUILDDIR=_build
-set SPHINXPROJ=MarkupSafe
if "%1" == "" goto help
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..295f450
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1,2 @@
+Sphinx~=1.8.0
+Pallets-Sphinx-Themes~=1.1.0
diff --git a/tox.ini b/tox.ini
index 628547a..efd0163 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,12 +11,8 @@ deps =
commands = pytest --cov={envsitepackagesdir}/markupsafe --cov-config=tox.ini --cov-report='' --cov-append {posargs}
[testenv:docs-html]
-deps =
- sphinx
- pallets-sphinx-themes
- sphinxcontrib-log-cabinet
-commands =
- sphinx-build -M html docs {envtmpdir}
+deps = -r docs/requirements.txt
+commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:coverage-report]
deps = coverage