From 9b1a2da589670f714aaea2e0f672e6ddfa61351a Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 9 Jun 2016 14:09:54 +0200 Subject: [PATCH] Added book-product.json --- README.adoc | 5 ++--- book-product.json | 25 +++++++++++++++++++++++++ book.json | 18 +++++++----------- build.sh | 2 -- gitlab-conversion.py | 7 +++++-- 5 files changed, 39 insertions(+), 18 deletions(-) create mode 100755 book-product.json diff --git a/README.adoc b/README.adoc index 08ecb3da6d..9701180643 100755 --- a/README.adoc +++ b/README.adoc @@ -1,10 +1,9 @@ -{{book.title}} -=========================================== += Securing Applications and Services Guide image:images/keycloak_logo.png[alt="Keycloak"] -*Keycloak* _Documentation_ for {{book.project.version}} +{{book.project.name}} {{book.project.version}} http://www.keycloak.org diff --git a/book-product.json b/book-product.json new file mode 100755 index 0000000000..3a5a3448d7 --- /dev/null +++ b/book-product.json @@ -0,0 +1,25 @@ +{ + "gitbook": "2.x.x", + "structure": { + "readme": "README.adoc" + }, + "plugins": [ + "toggle-chapters", + "ungrey", + "splitter" + ], + "variables": { + "title": "Securing Applications and Services Guide", + "project": { + "name": "Red Hat Single Sign-On", + "version": "7.0.0" + }, + "community": false, + "product": true, + "images": "rhsso-images", + "adminguide": { + "name": "Server Administration Guide", + "link": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0.0/server-administration-guide/" + } + } +} diff --git a/book.json b/book.json index 56e8fe14f5..d3dcf33ef5 100755 --- a/book.json +++ b/book.json @@ -10,20 +10,16 @@ ], "variables": { "title": "Securing Applications and Services Guide", - "community": true, - "product": false, - "images": "keycloak-images", - "appserver": { - "name": "Wildfly", - "version": "10" - }, - "adminguide": { - "name": "Keycloak Administration Guide", - "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" - }, "project": { "name": "Keycloak", "version": "1.9.7.Final" + }, + "community": true, + "product": false, + "images": "keycloak-images", + "adminguide": { + "name": "Server Administration Guide", + "link": "https://keycloak.gitbooks.io/server-adminstration-guide/content/" } } } diff --git a/build.sh b/build.sh index 4befdf8200..fc1e19f7fb 100755 --- a/build.sh +++ b/build.sh @@ -5,5 +5,3 @@ cd $(readlink -f `dirname $0`) python gitlab-conversion.py cd target asciidoctor master.adoc - -xdg-open master.html diff --git a/gitlab-conversion.py b/gitlab-conversion.py index 630665f150..9144f04d72 100755 --- a/gitlab-conversion.py +++ b/gitlab-conversion.py @@ -42,6 +42,9 @@ if os.path.isdir('keycloak-images'): if os.path.isdir('rhsso-images'): shutil.copytree('rhsso-images',os.path.join(targetdir, 'rhsso-images')) +shutil.copyfile('metadata.ini', os.path.join(targetdir, 'metadata.ini')); +shutil.copyfile('master-docinfo.xml', os.path.join(targetdir, 'master-docinfo.xml')); + tmp = os.path.join(targetdir, 'topics') if not os.path.exists(tmp): os.makedirs(tmp) @@ -67,8 +70,8 @@ input = re.sub(r"[ ]*\.+\s*link:(.*)\[(.*)\]", "include::\g<1>[]", input) input = applyTransformation(input) output.write(input) -# parse book.json file and create document attributes -with open('book.json') as data_file: +# parse book-product.json file and create document attributes +with open('book-product.json') as data_file: data = json.load(data_file) variables = data['variables']