added variables to json and master-docinfo files
This commit is contained in:
parent
8299c444a2
commit
d424d274be
3 changed files with 78 additions and 7 deletions
|
@ -12,7 +12,9 @@
|
||||||
"title": "Getting Started Guide",
|
"title": "Getting Started Guide",
|
||||||
"project": {
|
"project": {
|
||||||
"name": "Red Hat Single Sign-On",
|
"name": "Red Hat Single Sign-On",
|
||||||
"version": "7.1.0"
|
"version": "7.1.0",
|
||||||
|
"doc_base_url": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/",
|
||||||
|
"doc_info_version_url": "7.1-Beta"
|
||||||
},
|
},
|
||||||
"community": false,
|
"community": false,
|
||||||
"product": true,
|
"product": true,
|
||||||
|
|
69
buildGuide.sh
Executable file
69
buildGuide.sh
Executable file
|
@ -0,0 +1,69 @@
|
||||||
|
# Build the guide
|
||||||
|
|
||||||
|
# Find the directory name and full path
|
||||||
|
CURRENT_GUIDE=${PWD##*/}
|
||||||
|
CURRENT_DIRECTORY=$(pwd)
|
||||||
|
|
||||||
|
usage(){
|
||||||
|
cat <<EOM
|
||||||
|
USAGE: $0 [OPTION]
|
||||||
|
|
||||||
|
DESCRIPTION: Build the documentation in this directory.
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
-h Print help.
|
||||||
|
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts "ht:" c
|
||||||
|
do
|
||||||
|
case "$c" in
|
||||||
|
h) usage
|
||||||
|
exit 1;;
|
||||||
|
\?) echo "Unknown option: -$OPTARG." >&2
|
||||||
|
usage
|
||||||
|
exit 1;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d target ]; then
|
||||||
|
echo "You must run 'python gitlab-conversion.py' to convert the content before you run this script."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove the html and build directories and then recreate the html/images/ directory
|
||||||
|
if [ -d target/html ]; then
|
||||||
|
- rm -r target/html/
|
||||||
|
fi
|
||||||
|
if [ -d target/html ]; then
|
||||||
|
rm -r target/html/
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p html
|
||||||
|
cp -r target/images/ target/html/
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "********************************************"
|
||||||
|
echo " Building $CURRENT_GUIDE "
|
||||||
|
echo "********************************************"
|
||||||
|
echo ""
|
||||||
|
echo "Building an asciidoctor version of the guide"
|
||||||
|
asciidoctor -t -dbook -a toc -o target/html/$CURRENT_GUIDE.html target/master.adoc
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Building a ccutil version of the guide"
|
||||||
|
ccutil compile --lang en_US --format html-single --main-file target/master.adoc
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
echo "View the asciidoctor build here: " file://$CURRENT_DIRECTORY/target/html/$CURRENT_GUIDE.html
|
||||||
|
|
||||||
|
if [ -d $CURRENT_DIRECTORY/build/tmp/en-US/html-single/ ]; then
|
||||||
|
echo "View the ccutil build here: " file://$CURRENT_DIRECTORY/build/tmp/en-US/html-single/index.html
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo -e "${RED}Build using ccutil failed!"
|
||||||
|
echo -e "${BLACK}See the log above for details."
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -1,10 +1,10 @@
|
||||||
<productname>Red Hat Single Sign-On</productname>
|
<productname>{book_project_name}</productname>
|
||||||
<productnumber>7.1-Beta</productnumber>
|
<productnumber>{book_project_doc_info_version_url}</productnumber>
|
||||||
<subtitle>Getting Started Guide</subtitle>
|
<subtitle>For Use with {book_project_name} {book_project_doc_info_version_url}</subtitle>
|
||||||
<title>Getting Started Guide</title>
|
<title>{book_title}</title>
|
||||||
<release>7.1-Beta</release>
|
<release>{book_project_doc_info_version_url}</release>
|
||||||
<abstract>
|
<abstract>
|
||||||
<para>This guide consists of basic information and instruction to get started with Red Hat Single Sign-On 7.1-Beta</para>
|
<para>This guide consists of basic information and instruction to get started with {book_project_name} {book_project_doc_info_version_url}</para>
|
||||||
</abstract>
|
</abstract>
|
||||||
<authorgroup>
|
<authorgroup>
|
||||||
<orgname>Red Hat Customer Content Services</orgname>
|
<orgname>Red Hat Customer Content Services</orgname>
|
||||||
|
|
Loading…
Reference in a new issue