Skip to content

Commit 9fc1bcf

Browse files
authoredNov 12, 2021
WIP: Use furo Sphinx theme for Cookiecutter documentation (#612)
* Add furo 2021.11.12 to docs/requirements.txt * Configure Sphinx to use furo theme * Drop custom CSS * Remove obsolete table class from User Guide * Use headings for FAQ entries * Remove table of contents from User Guide
1 parent f08fd6e commit 9fc1bcf

File tree

5 files changed

+11
-110
lines changed

5 files changed

+11
-110
lines changed
 

‎docs/_static/custom.css

-71
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,3 @@
1-
table.hypermodern-table {
2-
border-collapse: collapse;
3-
margin-top: 2rem;
4-
margin-bottom: 4rem;
5-
max-width: 550px;
6-
text-align: center;
7-
width: 100%;
8-
box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.1), 0px 10px 20px rgba(0, 0, 0, 0.05),
9-
0px 20px 20px rgba(0, 0, 0, 0.05), 0px 30px 20px rgba(0, 0, 0, 0.05);
10-
}
11-
12-
table.hypermodern-table caption {
13-
background: #777;
14-
color: white;
15-
font-family: "Lucida Grande", "Helvetica Neue", sans-serif;
16-
font-size: 95%;
17-
padding: 0.2rem;
18-
}
19-
20-
table.hypermodern-table th,
21-
table.hypermodern-table td {
22-
border: 1px solid #ccc;
23-
padding: 0.5rem;
24-
text-align: left;
25-
}
26-
27-
table.hypermodern-table tbody tr:nth-child(odd) {
28-
background: #eee;
29-
}
30-
31-
table.hypermodern-table code {
32-
background-color: inherit;
33-
}
34-
35-
div.admonition {
36-
border: none;
37-
padding: 10px 20px;
38-
}
39-
40-
div.admonition p.admonition-title {
41-
background: #777;
42-
color: white;
43-
display: block;
44-
font-family: "Lucida Grande", "Helvetica Neue", sans-serif;
45-
font-size: inherit;
46-
margin: -10px -20px 0px -20px;
47-
padding: 5px 20px;
48-
}
49-
50-
div.admonition p.admonition-title:after {
51-
content: "";
52-
}
53-
54-
div.contents li {
55-
list-style-type: none;
56-
}
57-
58-
code {
59-
background: transparent;
60-
}
61-
62-
code.xref,
63-
a code {
64-
font-weight: normal;
65-
}
66-
67-
ul,
68-
ol {
69-
margin: 10px 30px 10px 30px;
70-
}
71-
721
/* Do not underline badges */
732
.badges a.reference {
743
border-bottom: 0px;

‎docs/conf.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,8 @@
88
extensions = ["sphinx.ext.intersphinx"]
99
intersphinx_mapping = {"mypy": ("https://mypy.readthedocs.io/en/stable/", None)}
1010
language = "en"
11-
html_static_path = ["_static"]
12-
html_theme = "alabaster"
13-
html_theme_options = {
14-
"github_banner": "true",
15-
"github_button": "true",
16-
"github_count": "true",
17-
"github_user": "cjolowicz",
18-
"github_repo": "cookiecutter-hypermodern-python",
19-
"github_type": "star",
20-
"logo": "logo.png",
21-
"logo_name": "true",
22-
"fixed_sidebar": "true",
23-
"sidebar_width": "250px",
24-
}
11+
html_theme = "furo"
12+
html_logo = "_static/logo.png"
2513
linkcheck_ignore = [
2614
"codeofconduct.html",
2715
"https://github.com/PyCQA/flake8-bugbear#",

‎docs/guide.rst

-22
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ a Python template based on the `Hypermodern Python`_ article series.
88
If you're in a hurry, check out the :doc:`quickstart guide <quickstart>`
99
and the :ref:`tutorials <Tutorials>`.
1010

11-
.. contents::
12-
:local:
13-
:backlinks: none
14-
1511

1612
Introduction
1713
~~~~~~~~~~~~
@@ -235,7 +231,6 @@ using a subdirectory with the same name as your project.
235231
Here is a complete list of the project variables defined by this template:
236232

237233
.. table:: Project variables
238-
:class: hypermodern-table
239234
:widths: auto
240235

241236
====================== ================================= ===================================
@@ -337,7 +332,6 @@ This section provides an overview of all the files generated for your project.
337332
Let's start with the directory layout:
338333

339334
.. table:: Directories
340-
:class: hypermodern-table
341335
:widths: auto
342336

343337
===================================== ===============================
@@ -351,7 +345,6 @@ The Python package is located in the ``src/<package>`` directory.
351345
For more details on these files, refer to the section :ref:`The initial package`.
352346

353347
.. table:: Python package
354-
:class: hypermodern-table
355348
:widths: auto
356349

357350
===================================== ===============================
@@ -364,7 +357,6 @@ The test suite is located in the ``tests`` directory.
364357
For more details on these files, refer to the section :ref:`The test suite`.
365358

366359
.. table:: Test suite
367-
:class: hypermodern-table
368360
:widths: auto
369361

370362
===================================== ===============================
@@ -376,7 +368,6 @@ The project documentation is written in reStructuredText_.
376368
The documentation files in the top-level directory are rendered on GitHub_:
377369

378370
.. table:: Documentation files (top-level)
379-
:class: hypermodern-table
380371
:widths: auto
381372

382373
======================= ============================================
@@ -391,7 +382,6 @@ built using :ref:`Sphinx <Documentation>` and
391382
hosted on :ref:`Read the Docs <Read the Docs integration>`:
392383

393384
.. table:: Documentation files (Sphinx)
394-
:class: hypermodern-table
395385
:widths: auto
396386

397387
====================== =======================================================
@@ -405,7 +395,6 @@ hosted on :ref:`Read the Docs <Read the Docs integration>`:
405395
The ``.github/workflows`` directory contains the :ref:`GitHub Actions workflows <GitHub Actions workflows>`:
406396

407397
.. table:: GitHub Actions workflows
408-
:class: hypermodern-table
409398
:widths: auto
410399

411400
======================= ===============================
@@ -420,7 +409,6 @@ The table below lists these files,
420409
and links each file to a section with more details.
421410

422411
.. table:: Configuration files
423-
:class: hypermodern-table
424412
:widths: auto
425413

426414
===================================== ========================================
@@ -450,7 +438,6 @@ The table below lists some additional files with pinned dependencies.
450438
Follow the links for more details on these.
451439

452440
.. table:: Dependency files
453-
:class: hypermodern-table
454441
:widths: auto
455442

456443
===================================== ================================
@@ -736,7 +723,6 @@ The template also comes with various development dependencies.
736723
See the table below for an overview of the dependencies of generated projects:
737724

738725
.. table:: Dependencies
739-
:class: hypermodern-table
740726
:widths: auto
741727

742728
======================= ====================================================================================
@@ -1099,7 +1085,6 @@ Overview of Nox sessions
10991085
The following table gives an overview of the available Nox sessions:
11001086

11011087
.. table:: Nox sessions
1102-
:class: hypermodern-table
11031088
:widths: auto
11041089

11051090
========================================== ===================================== ================== =========
@@ -1644,7 +1629,6 @@ Overview of pre-commit hooks
16441629
The |HPC| comes with a pre-commit configuration consisting of the following hooks:
16451630

16461631
.. table:: pre-commit hooks
1647-
:class: hypermodern-table
16481632
:widths: auto
16491633

16501634
======================== ===============================================
@@ -1738,7 +1722,6 @@ The following table lists the Flake8 plugins used by the |HPC|,
17381722
and links to their lists of error codes.
17391723

17401724
.. table:: Flake8 plugins
1741-
:class: hypermodern-table
17421725
:widths: auto
17431726

17441727
================================ ============================================= ======================================
@@ -2076,7 +2059,6 @@ __ https://docs.github.com/en/github/administering-a-repository/configuration-op
20762059
It manages the following dependencies:
20772060

20782061
.. table::
2079-
:class: hypermodern-table
20802062
:widths: auto
20812063

20822064
=================== ===================================== ================================================
@@ -2175,7 +2157,6 @@ Overview of workflows
21752157
The |HPC| defines the following workflows:
21762158

21772159
.. table:: GitHub Actions workflows
2178-
:class: hypermodern-table
21792160
:widths: auto
21802161

21812162
===================================================== ======================== ==================================== =====================
@@ -2193,7 +2174,6 @@ Overview of GitHub Actions
21932174
Workflows use the following GitHub Actions:
21942175

21952176
.. table:: GitHub Actions
2196-
:class: hypermodern-table
21972177
:widths: auto
21982178

21992179
============================================ =========================================================
@@ -2272,7 +2252,6 @@ as shown in the table below:
22722252
__ https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources
22732253

22742254
.. table:: Jobs in the Tests workflow
2275-
:class: hypermodern-table
22762255
:widths: auto
22772256

22782257
========================================== ====================== ==================
@@ -2335,7 +2314,6 @@ You can generate these tokens from your account settings on these services.
23352314
The tokens need to be stored as secrets in the repository settings on GitHub:
23362315

23372316
.. table:: Secrets
2338-
:class: hypermodern-table
23392317
:widths: auto
23402318

23412319
=================== ===================

‎docs/index.rst

+8-3
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ Features
4343
FAQ
4444
---
4545

46-
*What is this project about?*
46+
What is this project about?
47+
...........................
4748

4849
The mission of this project is to
4950
enable current best practices
5051
through modern Python tooling.
5152

52-
*What makes this project different from other Python templates?*
53+
54+
What makes this project different from other Python templates?
55+
..............................................................
5356

5457
This is a general-purpose template for Python libraries and applications.
5558

@@ -65,7 +68,9 @@ The project template is centered around the following tools:
6568
- Nox_ for automation of checks and other development tasks
6669
- `GitHub Actions`_ for continuous integration and delivery
6770

68-
*Why is this Python template called "hypermodern"?*
71+
72+
Why is this Python template called "hypermodern"?
73+
.................................................
6974

7075
Hypermodernism_ is a school of chess that dates back to more than a century ago.
7176
If this setup ever goes out of fashion,

‎docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
furo==2021.11.12
12
sphinx==4.3.0
23
sphinx-autobuild==2021.3.14

0 commit comments

Comments
 (0)