summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2016-02-24 12:10:37 -0500
committerDoug Hellmann <doug@doughellmann.com>2016-02-24 12:11:39 -0500
commitbb8dbeb3a361586886b1bb060a3d98ffbf5f7e31 (patch)
treee5c1a004f8ccccaaf428ca5e79a299f2df422acb /doc
parent9e32b8f19d876be714b52b63b8d89be76927af38 (diff)
downloadoslo-middleware-bb8dbeb3a361586886b1bb060a3d98ffbf5f7e31.tar.gz
work around doc build error3.7.0
This patch addresses a documentation build issue caused by the oslo.config sphinx integration. In order to unblock this repo, we can work around the issue here while fixing it in oslo.config, then revert this change. Change-Id: Ie4a29e8e8d44d00354ea0dd8420bac5b8812a717 Related-Bug: #1549106 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/source/conf.py8
-rw-r--r--doc/source/cors.rst9
-rw-r--r--doc/source/cors_config_file.cfg2
3 files changed, 18 insertions, 1 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index a5301af..af9a25f 100755
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -25,9 +25,17 @@ extensions = [
#'sphinx.ext.intersphinx',
'oslosphinx',
'oslo_config.sphinxext',
+ 'oslo_config.sphinxconfiggen',
'stevedore.sphinxext',
]
+# NOTE(dhellmann): An issue with the oslo.config sphinx integration
+# makes the show-options directive here result in
+# duplicate target nodes being introduced. Until we
+# can fix that, use the other directive to dump a
+# config file and include it as literal text.
+config_generator_config_file = 'cors_config_file.cfg'
+
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
diff --git a/doc/source/cors.rst b/doc/source/cors.rst
index 99e5dc0..7f0beec 100644
--- a/doc/source/cors.rst
+++ b/doc/source/cors.rst
@@ -125,7 +125,14 @@ configuration, this may be done as follows.::
Configuration Options
---------------------
-.. show-options:: oslo.middleware.cors
+.. NOTE(dhellmann): An issue with the oslo.config sphinx integration
+ makes the show-options directive here result in
+ duplicate target nodes being introduced. Until we
+ can fix that, use the other directive to dump a
+ config file and include it as literal text.
+.. .. show-options:: oslo.middleware.cors
+
+.. literalinclude:: sample.config
Module Documentation
--------------------
diff --git a/doc/source/cors_config_file.cfg b/doc/source/cors_config_file.cfg
new file mode 100644
index 0000000..2cc624e
--- /dev/null
+++ b/doc/source/cors_config_file.cfg
@@ -0,0 +1,2 @@
+[DEFAULT]
+namespace = oslo.middleware.cors