diff --git a/book-product.json b/book-product.json index 3c5c8a1014..e4279fa858 100755 --- a/book-product.json +++ b/book-product.json @@ -12,7 +12,9 @@ "title": "Getting Started Guide", "project": { "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, "product": true, diff --git a/buildGuide.sh b/buildGuide.sh new file mode 100755 index 0000000000..cb916ade78 --- /dev/null +++ b/buildGuide.sh @@ -0,0 +1,69 @@ +# Build the guide + +# Find the directory name and full path +CURRENT_GUIDE=${PWD##*/} +CURRENT_DIRECTORY=$(pwd) + +usage(){ + cat <&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 diff --git a/master-docinfo.xml b/master-docinfo.xml index e1e2020aaf..816c3150f3 100644 --- a/master-docinfo.xml +++ b/master-docinfo.xml @@ -1,10 +1,10 @@ -Red Hat Single Sign-On -7.1-Beta -Getting Started Guide -Getting Started Guide -7.1-Beta +{book_project_name} +{book_project_doc_info_version_url} +For Use with {book_project_name} {book_project_doc_info_version_url} +{book_title} +{book_project_doc_info_version_url} - This guide consists of basic information and instruction to get started with Red Hat Single Sign-On 7.1-Beta + This guide consists of basic information and instruction to get started with {book_project_name} {book_project_doc_info_version_url} Red Hat Customer Content Services