refactor: reintegrate HTML theme vendor
This commit is contained in:
parent
39fd5a7bf2
commit
fe411096be
4 changed files with 8 additions and 12 deletions
|
|
@ -1,7 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Sphinx victory-k.it theme.
|
Tiara's Sphinx theme reference implementation.
|
||||||
|
|
||||||
From https://bitbucket.org/victorykit/sphinx-victorykit-theme.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
|
|
@ -11,13 +9,12 @@ from sphinx import version_info as sphinx_version
|
||||||
from sphinx.locale import _
|
from sphinx.locale import _
|
||||||
from sphinx.util.logging import getLogger
|
from sphinx.util.logging import getLogger
|
||||||
|
|
||||||
|
# TODO: Figure out how to integrate with setuptools_scm
|
||||||
__version__ = '2.0.1alpha1'
|
__version__ = '0.0.1'
|
||||||
__version_full__ = __version__
|
__version_full__ = __version__
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_html_theme_path():
|
def get_html_theme_path():
|
||||||
"""Return list of HTML theme paths."""
|
"""Return list of HTML theme paths."""
|
||||||
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
|
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
|
||||||
|
|
@ -44,7 +41,7 @@ def setup(app):
|
||||||
|
|
||||||
app.require_sphinx('5.0')
|
app.require_sphinx('5.0')
|
||||||
if app.config.html4_writer:
|
if app.config.html4_writer:
|
||||||
logger.error("'html4_writer' is not supported with victorykit_theme.")
|
logger.error("'html4_writer' is not supported with sphinx_theme_ref.")
|
||||||
|
|
||||||
# Since Sphinx 6, jquery isn't bundled anymore and we need to ensure that
|
# Since Sphinx 6, jquery isn't bundled anymore and we need to ensure that
|
||||||
# the sphinxcontrib-jquery extension is enabled.
|
# the sphinxcontrib-jquery extension is enabled.
|
||||||
|
|
@ -60,7 +57,7 @@ def setup(app):
|
||||||
# jquery_add_js_files(app, app.config)
|
# jquery_add_js_files(app, app.config)
|
||||||
|
|
||||||
# Register the theme that can be referenced without adding a theme path
|
# Register the theme that can be referenced without adding a theme path
|
||||||
app.add_html_theme('victorykit', path.abspath(path.dirname(__file__)))
|
app.add_html_theme('tiaras-theme-ref', path.abspath(path.dirname(__file__)))
|
||||||
|
|
||||||
# Add Sphinx message catalog for newer versions of Sphinx
|
# Add Sphinx message catalog for newer versions of Sphinx
|
||||||
# See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog
|
# See http://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_message_catalog
|
||||||
|
|
@ -68,7 +65,7 @@ def setup(app):
|
||||||
app.add_message_catalog('sphinx', rtd_locale_path)
|
app.add_message_catalog('sphinx', rtd_locale_path)
|
||||||
app.connect('config-inited', config_initiated)
|
app.connect('config-inited', config_initiated)
|
||||||
|
|
||||||
app.add_js_file('main.js')
|
app.add_js_file('assets/script/theme.js')
|
||||||
|
|
||||||
# sphinx emits the permalink icon for headers, so choose one more in keeping with our theme
|
# sphinx emits the permalink icon for headers, so choose one more in keeping with our theme
|
||||||
app.config.html_permalinks_icon = "\uf0c1"
|
app.config.html_permalinks_icon = "\uf0c1"
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
(()=>{"use strict";console.log("Hello World! 222")})();
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[theme]
|
[theme]
|
||||||
inherit = "basic"
|
inherit = "basic"
|
||||||
stylesheets = [
|
stylesheets = [
|
||||||
"style/main.css",
|
"assets/style/theme.css",
|
||||||
]
|
]
|
||||||
sidebars = [
|
sidebars = [
|
||||||
"localtoc.html",
|
"localtoc.html",
|
||||||
|
|
|
||||||
2
vendor/html-theme-ref
vendored
2
vendor/html-theme-ref
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 46ad9174885551befff6c3788ba02b7dc8ccd4d9
|
Subproject commit b54f37cfd2a99b117fb714a67470818a890a302a
|
||||||
Loading…
Add table
Add a link
Reference in a new issue