summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ext/nova_autodoc.py1
-rwxr-xr-xdoc/generate_autodoc_index.sh11
2 files changed, 10 insertions, 2 deletions
diff --git a/doc/ext/nova_autodoc.py b/doc/ext/nova_autodoc.py
index 3dd992d84..704c590f0 100644
--- a/doc/ext/nova_autodoc.py
+++ b/doc/ext/nova_autodoc.py
@@ -5,6 +5,7 @@ gettext.install('nova')
from nova import utils
+
def setup(app):
rootdir = os.path.abspath(app.srcdir + '/..')
print "**Autodocumenting from %s" % rootdir
diff --git a/doc/generate_autodoc_index.sh b/doc/generate_autodoc_index.sh
index 4e2870bfc..5d9cdd315 100755
--- a/doc/generate_autodoc_index.sh
+++ b/doc/generate_autodoc_index.sh
@@ -10,9 +10,16 @@ for x in `./find_autodoc_modules.sh`;
do
echo "Generating ${SOURCEDIR}/${x}.rst"
echo "${SOURCEDIR}/${x}.rst" >> .autogenerated
+ heading="The :mod:\`${x}\` Module"
+ # Figure out how long the heading is
+ # and make sure to emit that many '=' under
+ # it to avoid heading format errors
+ # in Sphinx.
+ let heading_len=$(echo "$heading" | wc -c)
+ underline=$(head -c $heading_len < /dev/zero | tr '\0' '=')
( cat <<EOF
-The :mod:\`${x}\` Module
-==============================================================================
+${heading}
+${underline}
.. automodule:: ${x}
:members:
:undoc-members: