]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
doc: update sphinx api to use add_css_file
authorPhilippe Antoine <contact@catenacyber.fr>
Mon, 17 May 2021 14:27:49 +0000 (16:27 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 21 May 2021 09:08:16 +0000 (11:08 +0200)
instead of deprecated add_stylesheet

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': [