doc: fix sphinx compatibility
diff mbox series

Message ID 20200409210322.1099662-1-thomas@monjalon.net
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • doc: fix sphinx compatibility
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon April 9, 2020, 9:03 p.m. UTC
The function add_stylesheet() is deprecated since sphinx 1.8.
It will be removed in sphinx 4.0.
It is replaced by add_css_file().

Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 doc/guides/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Thomas Monjalon April 16, 2020, 8:08 p.m. UTC | #1
09/04/2020 23:03, Thomas Monjalon:
> The function add_stylesheet() is deprecated since sphinx 1.8.
> It will be removed in sphinx 4.0.
> It is replaced by add_css_file().
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Applied

Patch
diff mbox series

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index c368fa51d4..6974f0fd2f 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -415,4 +415,7 @@  def setup(app):
         # Process the numref references once the doctree has been created.
         app.connect('doctree-resolved', process_numref)
 
-    app.add_stylesheet('css/custom.css')
+    try:
+        app.add_css_file('css/custom.css')
+    except:
+        app.add_stylesheet('css/custom.css')