mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Allow specifying multiple CSS files in themes (#10465)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = mytheme.css, extra.css
|
||||
@@ -0,0 +1,2 @@
|
||||
html_theme_path = ['_themes']
|
||||
html_theme = 'mytheme'
|
||||
@@ -0,0 +1,2 @@
|
||||
test-build-html-theme-having-multiple-stylesheets
|
||||
=================================================
|
||||
@@ -1782,3 +1782,12 @@ def test_theme_options_with_override(app, status, warning):
|
||||
result = (app.outdir / '_static' / 'documentation_options.js').read_text(encoding='utf8')
|
||||
assert 'NAVIGATION_WITH_KEYS: true' in result
|
||||
assert 'ENABLE_SEARCH_SHORTCUTS: false' in result
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='build-html-theme-having-multiple-stylesheets')
|
||||
def test_theme_having_multiple_stylesheets(app):
|
||||
app.build()
|
||||
content = (app.outdir / 'index.html').read_text(encoding='utf-8')
|
||||
|
||||
assert '<link rel="stylesheet" type="text/css" href="_static/mytheme.css" />' in content
|
||||
assert '<link rel="stylesheet" type="text/css" href="_static/extra.css" />' in content
|
||||
|
||||
Reference in New Issue
Block a user