From: Philippe Antoine Date: Mon, 17 May 2021 14:27:49 +0000 (+0200) Subject: doc: update sphinx api to use add_css_file X-Git-Tag: suricata-6.0.3~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b96f9c0dd5e599eb65a4d22a192c2862cb6f4e0c;p=thirdparty%2Fsuricata.git doc: update sphinx api to use add_css_file instead of deprecated add_stylesheet (cherry picked from commit 95f225e8fbd5d352a8ca86cd317f908034966ed4) --- diff --git a/doc/devguide/conf.py b/doc/devguide/conf.py index ef688bf165..8b727a8aa3 100644 --- a/doc/devguide/conf.py +++ b/doc/devguide/conf.py @@ -129,7 +129,10 @@ if not on_rtd: except: html_theme = 'default' def setup(app): - app.add_stylesheet('css/suricata.css') + if hasattr(app, 'add_css_file'): + app.add_css_file('css/suricata.css') + else: + app.add_stylesheet('css/suricata.css') else: html_context = { 'css_files': [ diff --git a/doc/userguide/conf.py b/doc/userguide/conf.py index 95670fc468..baf4726e62 100644 --- a/doc/userguide/conf.py +++ b/doc/userguide/conf.py @@ -135,7 +135,10 @@ if not on_rtd: except: html_theme = 'default' def setup(app): - app.add_stylesheet('css/suricata.css') + if hasattr(app, 'add_css_file'): + app.add_css_file('css/suricata.css') + else: + app.add_stylesheet('css/suricata.css') else: html_context = { 'css_files': [