Skip to content

Commit

Permalink
Sphinx 5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Jun 1, 2022
1 parent 20a6eb0 commit d955850
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/customisation/announcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Furo makes it fairly straightforward to add a site-wide announcement (AKA top banner). The announcement is added to the top of all pages on the website.

This is done by setting `announcement` key in {any}`html_theme_options` in your `conf.py` file. The value of this key is HTML, which is included as-is into the page.
This is done by setting `announcement` key in [`html_theme_options`][sphinx-html_theme_options] in your `conf.py` file. The value of this key is HTML, which is included as-is into the page.

```python
html_theme_options = {
Expand All @@ -11,3 +11,5 @@ html_theme_options = {
```

The background and foreground of the announcement element are customisable, via the mechanisms described in {doc}`colors`.

[sphinx-html_theme_options]: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_theme_options
4 changes: 3 additions & 1 deletion docs/customisation/edit-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Furo can add a small edit button to each document.

This is automatically added, when the documentation is generated on Read the Docs using a GitHub repository as the source. It is possible to provide this, outside of Read the Docs, by setting the following keys in {any}`html_theme_options`:
This is automatically added, when the documentation is generated on Read the Docs using a GitHub repository as the source. It is possible to provide this, outside of Read the Docs, by setting the following keys in [`html_theme_options`][sphinx-html_theme_options]:

```python
html_theme_options = {
Expand All @@ -15,3 +15,5 @@ html_theme_options = {
## Disabling on Read the Docs

If you're building documentation on Read the Docs using a GitHub repository as the source, the edit button is enabled by default. If you wish to disable this, use {ref}`top_of_page_button`.

[sphinx-html_theme_options]: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_theme_options
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"beautifulsoup4",
"sphinx ~= 4.0",
"sphinx >= 4.0,<6.0",
"sphinx-basic-ng",
"pygments",
]
Expand Down
14 changes: 14 additions & 0 deletions src/furo/assets/styles/content/_footnotes.sass
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
vertical-align: super

// Definition list, listing the content of each note.
// docutils <= 0.17
dl.footnote.brackets
font-size: var(--font-size--small)
color: var(--color-foreground-secondary)
Expand All @@ -27,3 +28,16 @@ dl.footnote.brackets
dd
margin: 0
padding: 0 1rem

// docutils >= 0.18
aside.footnote
font-size: var(--font-size--small)
color: var(--color-foreground-secondary)

aside.footnote > span,
div.citation > span
font-weight: 500

aside.footnote > p,
div.citation > p
margin-left: 2rem

0 comments on commit d955850

Please sign in to comment.