mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 23:29:36 +00:00
doc: use add_css_file(); not deprecated
add_stylesheet() is deprecated and removed in Sphinx 4.x Signed-off-by: Quentin Young <qlyoung@nvidia.com>
This commit is contained in:
parent
826186eab2
commit
d6ba203d2f
@ -395,8 +395,11 @@ def setup(app):
|
|||||||
# printfrr extensions
|
# printfrr extensions
|
||||||
app.add_object_type("frrfmt", "frrfmt", parse_node=parse_frrfmt)
|
app.add_object_type("frrfmt", "frrfmt", parse_node=parse_frrfmt)
|
||||||
|
|
||||||
# css overrides for HTML theme
|
if "add_css_file" in dir(app):
|
||||||
app.add_stylesheet("overrides.css")
|
app.add_css_file("overrides.css")
|
||||||
|
else:
|
||||||
|
app.add_stylesheet("overrides.css")
|
||||||
|
|
||||||
# load Pygments lexer for FRR config syntax
|
# load Pygments lexer for FRR config syntax
|
||||||
#
|
#
|
||||||
# NB: in Pygments 2.2+ this can be done with `load_lexer_from_file`, but we
|
# NB: in Pygments 2.2+ this can be done with `load_lexer_from_file`, but we
|
||||||
|
@ -386,16 +386,17 @@ def setup(app):
|
|||||||
# node later on
|
# node later on
|
||||||
app.add_object_type("clicmd", "clicmd", indextemplate="pair: %s; configuration command")
|
app.add_object_type("clicmd", "clicmd", indextemplate="pair: %s; configuration command")
|
||||||
|
|
||||||
# css overrides for HTML theme
|
# I dont care how stupid this is
|
||||||
# Note sphinx version differences
|
if "add_js_file" in dir(app):
|
||||||
sver = vparse(sphinx.__version__)
|
|
||||||
|
|
||||||
if sver < vparse("1.8.0"):
|
|
||||||
app.add_stylesheet("overrides.css")
|
|
||||||
app.add_javascript("overrides.js")
|
|
||||||
else:
|
|
||||||
app.add_css_file("overrides.css")
|
|
||||||
app.add_js_file("overrides.js")
|
app.add_js_file("overrides.js")
|
||||||
|
else:
|
||||||
|
app.add_javascript("overrides.js")
|
||||||
|
|
||||||
|
if "add_css_file" in dir(app):
|
||||||
|
app.add_css_file("overrides.css")
|
||||||
|
else:
|
||||||
|
app.add_stylesheet("overrides.css")
|
||||||
|
|
||||||
|
|
||||||
# load Pygments lexer for FRR config syntax
|
# load Pygments lexer for FRR config syntax
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user