From 75b85656ddad86cbf0c3adb1128b758242793929 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 4 May 2017 18:24:04 -0700 Subject: [PATCH] optionally enable sphinxcontrib.log_cabinet collapses old changelog directives closes #1704 closes #1867 --- docs/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index f53d72fa..47168c65 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,6 +38,14 @@ extensions = [ 'flaskdocext' ] +try: + __import__('sphinxcontrib.log_cabinet') +except ImportError: + print('sphinxcontrib-log-cabinet is not installed.') + print('Changelog directives will not be re-organized.') +else: + extensions.append('sphinxcontrib.log_cabinet') + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']