Skip to content

Commit

Permalink
Migrate html_context.css_files to html_css_files
Browse files Browse the repository at this point in the history
The use of html_context = {'css_files': []} replaces stylesheets
provided by default (pygments.css and css/theme.css), which
causes the generated documentation to be unformatted due to
incomplete CSS specification.

There's recomendation of using app.add_stylesheet('file.css'),
but it is deprecated since 1.8.0, was going to removed in
Sphinx 4.0 and then it was postponed to Sphinx 6.0.

Now, html_css_files = [] was added in 1.8.0 to append CSS
files, and will solve #361 by including flatpak-docs stylesheets
to the default CSS stylesheets.
  • Loading branch information
rffontenelle authored and TingPing committed Oct 20, 2022
1 parent 51854b3 commit 87acb3c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,11 @@
#
html_theme = 'sphinx_rtd_theme'

html_context = {
'css_files': [
'_static/dark.css',
'_static/theme_overrides.css', #GNOME specific overrides
'https://fonts.googleapis.com/css?family=Overpass:400,600,700|Source+Sans+Pro:400,400i,700,700i&display=swap&subset=latin-ext', # Web fonts
],
}
html_css_files = [
'dark.css',
'theme_overrides.css', #GNOME specific overrides
'https://fonts.googleapis.com/css?family=Overpass:400,600,700|Source+Sans+Pro:400,400i,700,700i&display=swap&subset=latin-ext', # Web fonts
]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down

0 comments on commit 87acb3c

Please sign in to comment.