From bbaca488250842faf7ef4f2b9c17cca156771f3e 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/userguide/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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': [