From 3703750b8f36acd2f1b87075d2f6399498a6fab3 Mon Sep 17 00:00:00 2001 From: Evert Rol Date: Wed, 10 Oct 2018 14:49:45 +0200 Subject: [PATCH 1/2] Fix path to custom CSS file Note: Sphinx automatically already includes a _static/custom.css file, so the change is not noticable; it only avoids a 404 for a single file. --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index af59a319..af81bb96 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,7 +44,7 @@ source_parsers = { } def setup(app): - app.add_stylesheet('_static/custom.css') # may also be an URL + app.add_stylesheet('custom.css') # may also be a URL # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: From d7cee534193a417d8b25696cf8bd067e7e84b279 Mon Sep 17 00:00:00 2001 From: Evert Rol Date: Wed, 10 Oct 2018 14:51:10 +0200 Subject: [PATCH 2/2] Remove underlines from H2 headers that are links The `contents::` directive in Sphinx causes the headers of referred sections to become links back to the line in the table of contents. This causes the headers to use the default attributes for links, including underlines. The latter makes the header style out of line with the rest of the documentation. A single `text-decoration: none` in the custom CSS file fixes this (note: only for H2 headers currently: these were the offending ones). --- docs/source/_static/custom.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/_static/custom.css b/docs/source/_static/custom.css index 1abb6e0a..acf770e2 100644 --- a/docs/source/_static/custom.css +++ b/docs/source/_static/custom.css @@ -5,3 +5,7 @@ img.logo { div.body p.caption { font-size: 1.5em; } + +h2 a.toc-backref { + text-decoration: none; +}