Skip to content

Commit 9618f2f

Browse files
committed
Use Furo theme for the documentation
1 parent 45d8dc2 commit 9618f2f

File tree

9 files changed

+71
-34
lines changed

9 files changed

+71
-34
lines changed

doc-source/_static/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* This file is managed by 'repo_helper'. Don't edit it directly. */
2+
3+
div.highlight {
4+
-moz-tab-size: 4;
5+
tab-size: 4;
6+
}
7+
8+
.field-list dt, dl.simple dt {
9+
margin-top: 0.5rem;
10+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--- This file is managed by 'repo_helper'. Don't edit it directly. --->
2-
{% extends "!layout.html" %}
2+
{% extends "!base.html" %}
33
{% block extrahead %}
44
<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
55
{% endblock %}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!---This file is managed by 'repo_helper'. Don't edit it directly.--->
2+
<div class="sidebar-tree">
3+
{{ furo_navigation_tree }}
4+
</div>
5+
6+
<div class="sidebar-tree">
7+
<p class="caption"><span class="caption-text">Links</span></p>
8+
<ul>
9+
<li class="toctree-l1"><a class="reference external" href="https://github.com/domdfcoding/flake8-sphinx-links">GitHub</a></li>
10+
<li class="toctree-l1"><a class="reference external" href="https://pypi.org/project/flake8_sphinx_links">PyPI</a></li>
11+
</ul>
12+
</div>

doc-source/codes.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc-source/conf.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,23 @@
6868
"sphinx": ("https://www.sphinx-doc.org/en/stable/", None),
6969
}
7070

71-
html_theme = "domdf_sphinx_theme"
72-
html_theme_options = {"logo_only": False}
71+
html_theme = "furo"
72+
html_theme_options = {
73+
"light_css_variables": {
74+
"toc-title-font-size": "12pt",
75+
"toc-font-size": "12pt",
76+
"admonition-font-size": "12pt",
77+
},
78+
"dark_css_variables": {
79+
"toc-title-font-size": "12pt",
80+
"toc-font-size": "12pt",
81+
"admonition-font-size": "12pt",
82+
},
83+
}
7384
html_theme_path = ["../.."]
7485
html_show_sourcelink = True # True will show link to source
7586

76-
html_context = {
77-
"display_github": True,
78-
"github_user": "domdfcoding",
79-
"github_repo": "flake8-sphinx-links",
80-
"github_version": "master",
81-
"conf_py_path": "/doc-source/",
82-
}
87+
html_context = {}
8388
htmlhelp_basename = slug
8489

8590
latex_documents = [("index", f'{slug}.tex', project, author, "manual")]

doc-source/index.rst

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ flake8_sphinx_links
125125

126126
.. end shields
127127
128-
For example, \`\`True\`\` should be py\:obj:\`True\`, which Sphinx will render as a link to the Python documentation.
129-
See :doc:`examples` for further examples.
130-
131-
reStructuredText .rst files are not currently checked.
132-
133128
134129
Installation
135130
---------------
@@ -145,16 +140,6 @@ Installation
145140
.. end installation
146141
147142
148-
Use as a pre-commit hook
149-
--------------------------
150-
151-
See `pre-commit <https://github.com/pre-commit/pre-commit>`_ for instructions
152-
153-
Sample ``.pre-commit-config.yaml``:
154-
155-
.. pre-commit:flake8:: 0.2.0
156-
157-
158143
.. toctree::
159144
:hidden:
160145

@@ -164,7 +149,7 @@ Sample ``.pre-commit-config.yaml``:
164149
:maxdepth: 3
165150
:caption: Documentation
166151

167-
codes
152+
usage
168153
examples
169154
API Reference<docs>
170155

doc-source/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
autodocsumm>=0.2.0
22
default-values>=0.4.2
3-
domdf-sphinx-theme>=0.3.0
43
extras-require>=0.2.0
4+
furo>=2020.11.19b18
55
pyyaml>=5.3.1
66
repo-helper-sphinx-theme>=0.0.2
77
seed-intersphinx-mapping>=0.3.1

doc-source/usage.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
========
2+
Usage
3+
========
4+
5+
This library provides the Flake8 plugin ``flake8-sphinx-links`` to check docstrings for double backticked
6+
strings which should be links to the Python documentation.
7+
8+
9+
For example, \`\`True\`\` should be py\:obj:\`True\`, which Sphinx will render as a link to the Python documentation.
10+
See :doc:`examples` for further examples.
11+
12+
reStructuredText .rst files are not currently checked.
13+
14+
15+
Flake8 codes
16+
--------------
17+
18+
.. flake8-codes:: flake8_sphinx_links
19+
20+
SXL001
21+
22+
23+
Pre-commit hook
24+
----------------
25+
26+
``flake8-sphinx-links`` can also be used as a ``pre-commit`` hook
27+
See `pre-commit <https://github.com/pre-commit/pre-commit>`_ for instructions
28+
29+
Sample ``.pre-commit-config.yaml``:
30+
31+
.. pre-commit:flake8:: 0.2.0

repo_helper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ short_desc: "A Flake8 plugin to check docstrings for double backticked strings w
1313
python_deploy_version: 3.6
1414
use_whey: true
1515
min_coverage: 100
16+
sphinx_html_theme: furo
1617

1718
conda_channels:
1819
- conda-forge

0 commit comments

Comments
 (0)