Skip to content

Commit 0268539

Browse files
authored
Merge pull request #238 from eclecticiq/improve-doc-navigation
Update build params for better navigation and to use sphinx_rtd_theme
2 parents 94eccc9 + 637fdec commit 0268539

File tree

4 files changed

+38
-85
lines changed

4 files changed

+38
-85
lines changed

.readthedocs.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@ version: 2
33
# Build from the docs/ directory with Sphinx
44
sphinx:
55
configuration: docs/conf.py
6+
builder: "dirhtml"
67

78
# Explicitly set the version of Python and its requirements
9+
build:
10+
os: "ubuntu-20.04"
11+
tools:
12+
python: "3.9"
13+
814
python:
9-
version: 3.7
1015
install:
1116
- requirements: docs/requirements.txt

CHANGES.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
0.9.2 (2022-08-26)
5+
------------------
6+
* Improve readability and navigation of docs (`#238 <https://github.com/eclecticiq/OpenTAXII/pull/238>`_ thanks `@zed-eiq <https://github.com/zed-eiq>`_ for the improvement).
7+
48
0.9.1 (2022-07-11)
59
------------------
610
* Implement `raise_unauthorized` for taxii2, this was missing and lead to 500 errors.

docs/conf.py

+27-83
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import datetime
1616
import sys
1717
import os
18+
import sphinx_rtd_theme
1819

1920
# If extensions (or modules to document with autodoc) are in another directory,
2021
# add these directories to sys.path here. If the directory is relative to the
@@ -30,7 +31,12 @@
3031
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3132
# ones.
3233
extensions = [
33-
'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.extlinks']
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.coverage',
36+
'sphinx.ext.extlinks',
37+
'sphinx_rtd_theme',
38+
'sphinx_search.extension',
39+
]
3440

3541
# Add any paths that contain templates here, relative to this directory.
3642
templates_path = ['_templates']
@@ -106,90 +112,28 @@
106112

107113
# The theme to use for HTML and HTML Help pages. See the documentation for
108114
# a list of builtin themes.
109-
html_theme = 'alabaster'
110-
111-
# Theme options are theme-specific and customize the look and feel of a theme
112-
# further. For a list of options available for each theme, see the
113-
# documentation.
114-
#html_theme_options = {}
115-
116-
# Add any paths that contain custom themes here, relative to this directory.
117-
#html_theme_path = []
118-
119-
# The name for this set of Sphinx documents. If None, it defaults to
120-
# "<project> v<release> documentation".
121-
#html_title = None
122-
123-
# A shorter title for the navigation bar. Default is the same as html_title.
124-
#html_short_title = None
125-
126-
# The name of an image file (relative to this directory) to place at the top
127-
# of the sidebar.
128-
#html_logo = None
129-
130-
# The name of an image file (within the static path) to use as favicon of the
131-
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
132-
# pixels large.
133-
#html_favicon = None
134-
135-
# Add any paths that contain custom static files (such as style sheets) here,
136-
# relative to this directory. They are copied after the builtin static files,
137-
# so a file named "default.css" will overwrite the builtin "default.css".
138-
html_static_path = ['_static']
139-
140-
# Add any extra paths that contain custom files (such as robots.txt or
141-
# .htaccess) here, relative to this directory. These files are copied
142-
# directly to the root of the documentation.
143-
#html_extra_path = []
144-
145-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
146-
# using the given strftime format.
147-
#html_last_updated_fmt = '%b %d, %Y'
148-
149-
# If true, SmartyPants will be used to convert quotes and dashes to
150-
# typographically correct entities.
151-
#html_use_smartypants = True
152-
153-
# Custom sidebar templates, maps document names to template names.
154-
html_sidebars = {
155-
'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
156-
'**': ['localtoc.html', 'relations.html',
157-
'sourcelink.html', 'searchbox.html']
115+
html_theme = 'sphinx_rtd_theme'
116+
117+
# -- sphinx-rtd-theme options -----------
118+
119+
html_theme_options = {
120+
# 'analytics_id': 'G-XXXXXXXXXX', # Provided by Google in your dashboard
121+
# 'analytics_anonymize_ip': False,
122+
'logo_only': False,
123+
'display_version': True,
124+
# 'canonical_url': 'https://opentaxii.readthedocs.io/', # important when we host on multiple urls
125+
'prev_next_buttons_location': 'bottom',
126+
'style_external_links': True,
127+
'vcs_pageview_mode': '',
128+
#'style_nav_header_background': 'white',
129+
# Toc options
130+
'collapse_navigation': True,
131+
'sticky_navigation': True,
132+
'navigation_depth': 4,
133+
'includehidden': True,
134+
'titles_only': False,
158135
}
159136

160-
# Additional templates that should be rendered to pages, maps page names to
161-
# template names.
162-
#html_additional_pages = {}
163-
164-
# If false, no module index is generated.
165-
html_domain_indices = False
166-
167-
# If false, no index is generated.
168-
#html_use_index = True
169-
170-
# If true, the index is split into individual pages for each letter.
171-
#html_split_index = False
172-
173-
# If true, links to the reST sources are added to the pages.
174-
html_show_sourcelink = False
175-
176-
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
177-
html_show_sphinx = False
178-
179-
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
180-
#html_show_copyright = True
181-
182-
# If true, an OpenSearch description file will be output, and all pages will
183-
# contain a <link> tag referring to it. The value of this option must be the
184-
# base URL from which the finished HTML is served.
185-
#html_use_opensearch = ''
186-
187-
# This is the file name suffix for HTML files (e.g. ".xhtml").
188-
#html_file_suffix = None
189-
190-
# Output file base name for HTML help builder.
191-
htmlhelp_basename = 'opentaxiidoc'
192-
193137

194138
# -- Options for LaTeX output ---------------------------------------------
195139

opentaxii/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
This module defines the package version for use in __init__.py and setup.py.
44
"""
55

6-
__version__ = '0.9.1'
6+
__version__ = '0.9.2'

0 commit comments

Comments
 (0)