]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc: update sphinx api to use add_css_file 6224/head
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 17 May 2021 14:27:49 +0000 (16:27 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 23 Jun 2021 06:36:42 +0000 (08:36 +0200)
instead of deprecated add_stylesheet

(cherry picked from commit 95f225e8fbd5d352a8ca86cd317f908034966ed4)

doc/devguide/conf.py
doc/userguide/conf.py

index ef688bf1656f180cd7b9b769a06b0c3f19c46bcc..8b727a8aa381e033e0a6555d97962862256d7a49 100644 (file)
@@ -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': [
index 95670fc468ea4ad56b3b50ee86ddf6ddff800563..baf4726e6238654da01f03facec7831d1ed43f9c 100644 (file)
@@ -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': [