From d6ba203d2fb190e38956082429a34c747cf9de9d Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 3 Jun 2021 13:41:13 -0400 Subject: doc: use add_css_file(); not deprecated add_stylesheet() is deprecated and removed in Sphinx 4.x Signed-off-by: Quentin Young --- doc/developer/conf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'doc/developer/conf.py') diff --git a/doc/developer/conf.py b/doc/developer/conf.py index 20265f4aad..8f282c0790 100644 --- a/doc/developer/conf.py +++ b/doc/developer/conf.py @@ -395,8 +395,11 @@ def setup(app): # printfrr extensions app.add_object_type("frrfmt", "frrfmt", parse_node=parse_frrfmt) - # css overrides for HTML theme - app.add_stylesheet("overrides.css") + 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 # # NB: in Pygments 2.2+ this can be done with `load_lexer_from_file`, but we -- cgit v1.2.3