Fix generation of markdown chapters
Use the very first line of a markdown file to set the title of the resulting docbook xml chapter. Change-Id: I2bda0b1c24e54d1c617df82fa5e7fb3f9bce41ca
This commit is contained in:
parent
3080ecacba
commit
dfade020ac
|
@ -100,8 +100,12 @@ Release notes
|
|||
0.9
|
||||
---
|
||||
|
||||
Fixes for openstack-doc-test:
|
||||
* openstack-doc-test now validates JSON files for well-formed-ness and
|
||||
whitespace.
|
||||
* Create proper chapter title for markdown files.
|
||||
* Ignore publish-docs directory completely.
|
||||
* Do not check for xml:ids in wadl resource.
|
||||
|
||||
0.8.2
|
||||
-----
|
||||
|
|
|
@ -50,8 +50,10 @@ type -P pandoc > /dev/null 2>&1 || { echo >&2 "pandoc not installed. Aborting."
|
|||
type -P xsltproc > /dev/null 2>&1 || { echo >&2 "xsltproc not installed. Aborting."; exit 1; }
|
||||
type -P xmllint > /dev/null 2>&1 || { echo >&2 "xmllint not installed. Aborting."; exit 1; }
|
||||
|
||||
TITLE=`head -n1 $DIRPATH/$FILENAME.md|sed -e 's/^#* *//'`
|
||||
pandoc -V xmlid=$FILENAME --template=$DIR/pandoc-template.docbook -f markdown -t docbook -s ${SOURCES} |\
|
||||
xsltproc -o - ${DB_UPGRADE} - |\
|
||||
xmllint --format - > ${DIRPATH}/$FILENAME.xml
|
||||
xmllint --format - |\
|
||||
sed -e "s|<title>NO TITLE</title>|<title>$TITLE</title>|" > ${DIRPATH}/$FILENAME.xml
|
||||
|
||||
pwd
|
||||
|
|
Loading…
Reference in New Issue