diff --git a/README.md b/README.md index bdd511c..af24bbf 100644 --- a/README.md +++ b/README.md @@ -78,3 +78,26 @@ tech-list | This tutorial provides a list of commonly used tools >> Start poc-rocketchat with URL: http://localhost:7030 > +# Create a new document + +> +> cd template +> +> ./init-docs.sh newdoc_1 +> +> cd ../newdoc_1 +> +> edit modules/ROOT/nav.adoc and modules/ROOT/pages/index.adoc +> +> 1. Test local +> +> ./build-local.sh +> +> Upload +> +> ./push.sh "add new" +> +> 2. Create from git +> +> ./build.sh + diff --git a/template/README.md b/template/README.md new file mode 100644 index 0000000..8f5dc92 --- /dev/null +++ b/template/README.md @@ -0,0 +1,61 @@ +# Swarmlab docs +## Application development in a distributed system +### Development of Distributed Systems from Design to Application + +---- + +# Build + +> git clone https://git.swarmlab.io:3000/docs/Documentation.git +> +> cd Documentation +> + +### On Error + +> +> Get https://hub.swarmlab.io:5480/v2/: x509: certificate +> +> Pulling ... +> +> ERROR: Get https://hub.swarmlab.io:5480/v2/: x509: certificate signed by unknown authority +> + + *run* +> +> ./0-get-certs.sh +> + + +### On Error response from daemon + +> +>docker: Error response from daemon: Get https://registry.vlabs.uniwa.gr:5080/v2/: dial tcp: lookup registry.vlabs.uniwa.gr on [::1]:53: read udp [::1]:56425->[::1]:53: read: connection refused. +> +>Try again! +> + +---- + +# Create a new document + +> +> ./init-docs.sh newdoc_1 +> +> cd ../newdoc_1 +> +> edit modules/ROOT/nav.adoc and modules/ROOT/pages/index.adoc +> +> 1. Test local +> +> ./build-local.sh +> +> Upload +> +> ./push.sh "add new" +> +> 2. Create from git +> +> ./build.sh +> + diff --git a/template/build-local.sh b/template/build-local.sh new file mode 100755 index 0000000..27fc5a5 --- /dev/null +++ b/template/build-local.sh @@ -0,0 +1,5 @@ +docker stop swarmlab-documentation +docker container rm swarmlab-documentation +docker pull hub.swarmlab.io:5480/antora + +docker run -ti --name swarmlab-documentation -p 8080:8080 -v $PWD/:/antora -v $PWD/supplemental-ui:/antora/supplemental-ui hub.swarmlab.io:5480/antora /bin/sh -c "DOCSEARCH_ENABLED=true DOCSEARCH_ENGINE=lunr DOCSEARCH_INDEX_VERSION=latest NODE_PATH=/usr/local/lib/node_modules:\$NODE_PATH exec sh -c '/antora/run/build-local.sh'" diff --git a/template/init-docs.sh b/template/init-docs.sh index 9306e8d..65d5855 100755 --- a/template/init-docs.sh +++ b/template/init-docs.sh @@ -122,6 +122,7 @@ cp -rf modules ${dname} cp -rf supplemental-ui ${dname} cp -rf run ${dname} cp -f build.sh ${dname} +cp -f build-local.sh ${dname} cp -f antora.yml ${dname} cp -f site.yml ${dname} cp -f push.sh ${dname} diff --git a/template/run/build-local.sh b/template/run/build-local.sh new file mode 100755 index 0000000..602c0cd --- /dev/null +++ b/template/run/build-local.sh @@ -0,0 +1,4 @@ +#antora --fetch /antora/site.yml +antora /antora/site.yml +ifconfig +http-server build/site -c-1