doc: fix sphinx compatibility
Checks
Commit Message
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
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
@@ -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')