From b96f9c0dd5e599eb65a4d22a192c2862cb6f4e0c Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Mon, 17 May 2021 16:27:49 +0200 Subject: [PATCH] doc: update sphinx api to use add_css_file instead of deprecated add_stylesheet (cherry picked from commit 95f225e8fbd5d352a8ca86cd317f908034966ed4) --- doc/devguide/conf.py | 5 ++++- doc/userguide/conf.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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': [ -- 2.47.2