diff --git a/.env.template b/.env.template deleted file mode 100644 index f7649a0..0000000 --- a/.env.template +++ /dev/null @@ -1,2 +0,0 @@ -GIT_GLOBAL_MAIL= -GIT_GLOBAL_USER_NAME= \ No newline at end of file diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..f3f3b9b --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,44 @@ +name: Docs + +on: + push: + branches: + - 'main' + paths: + - asciidocs/** + workflow_dispatch: +permissions: + contents: write +jobs: + build: + name: Build & Publish 🚀 + runs-on: ubuntu-latest + env: + INPUTPATH: asciidocs + SLIDES: true + BRANCH: gh-pages + steps: + - uses: actions/checkout@v4 + + #- name: install packages + # uses: awalsh128/cache-apt-pkgs-action@latest + # with: + # packages: asciidoctor graphviz + # version: 1.0 + + #- name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + + - name: run docker + run: | + sudo ${{ env.INPUTPATH }}/scripts/docker-convert.sh ${{ env.INPUTPATH }} ${{ env.SLIDES }} + tree + + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@releases/v4 + with: + # GITHUB_TOKEN: ${{ github.TOKEN }} + #GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + branch: ${{ env.BRANCH }} + folder: ${{ env.INPUTPATH }} diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..9f30fbf --- /dev/null +++ b/README.adoc @@ -0,0 +1,93 @@ += asciidoctor-html-template +Thomas Stütz +1.0.0, {docdate} +:imagesdir: img +:icons: font +:sectnums: // Nummerierung der Überschriften / section numbering +// :toc: +// :toclevels: 1 +:experimental: +//https://gist.github.com/dcode/0cfbf2699a1fe9b46ff04c41721dda74?permalink_comment_id=3948218 +ifdef::env-github[] +:tip-caption: :bulb: +:note-caption: :information_source: +:important-caption: :heavy_exclamation_mark: +:caution-caption: :fire: +:warning-caption: :warning: +endif::[] + +image::https://img.shields.io/badge/version-1.0.0-blue[] + +== doc-as-code + +=== Overview + +The purpose of this template is to convert adoc-Files to html-Files +These files are divided in html-documents and html-slides. The slides are rendered using https://revealjs.com/[revealjs^]. + +The convertion of the adoc-files is processed in a docker-container. + + +image::/img/adoc-to-html.png[] + +=== Usage + +==== Initial Configuration + +* After templating this repo commit and push the demo page + +* Set Settings - Pages - Branch: gh-pages - Folder: / (root) ++ +[%collapsible] +==== +image::/img/permissions-for-asciidoc-2.png[] +==== + +==== Accessing the Website(s) for docs + +* https://**.github.io/** + +** ie https://htl-leonding-college.github.io/asciidoctor-html-template + +==== Accessing the Website(s) for slides + +* https://**.github.io/**/demo/** + +** ie https://htl-leonding-college.github.io/asciidoctor-html-template/slides/demo.html + + + +==== Remote Rendering by github-actions + +When commiting and pushing the adoc-files into github, they are automatically rendered by github-actions to html in a (new) branch `gh-pages`. All sub-folders with adoc-files are included. + +==== Local Rendering + +Because the rendering with gh-actions on a gh-runner takes time, it is possible to create a local dist-folder with + +[source,bash] +---- +./local-convert.sh +---- + +IMPORTANT: You need docker installed locally. + +You even can publish your locally created html-slides with + +[source,bash] +---- +./publish.sh +---- + + + +=== Customizing + +IMPORTANT: You should not change the scripts in the `asciidocs`-folder, unless you really know what to do. + +* The script are available in the `asciidocs`-Folder. So you could change the options for the asciidoctor-engine or the version of revealjs. + +=== Docs +** https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/[Asciidoctor Quick Reference] +** https://asciidoctor.org/docs/asciidoc-writers-guide/[AsciiDoc Writer’s Guide^] +** https://docs.asciidoctor.org/reveal.js-converter/latest/converter/features/[Slides with Asciidoctor for revealjs^] diff --git a/asciidocs/create-oravm.adoc b/asciidocs/docs/create-oravm.adoc similarity index 100% rename from asciidocs/create-oravm.adoc rename to asciidocs/docs/create-oravm.adoc diff --git a/asciidocs/create-quarkus-app.adoc b/asciidocs/docs/create-quarkus-app.adoc similarity index 100% rename from asciidocs/create-quarkus-app.adoc rename to asciidocs/docs/create-quarkus-app.adoc diff --git a/asciidocs/docinfo.html b/asciidocs/docs/docinfo.html similarity index 100% rename from asciidocs/docinfo.html rename to asciidocs/docs/docinfo.html diff --git a/asciidocs/gh-actions.adoc b/asciidocs/docs/gh-actions.adoc similarity index 100% rename from asciidocs/gh-actions.adoc rename to asciidocs/docs/gh-actions.adoc diff --git a/asciidocs/gh-refuse-workflow.adoc b/asciidocs/docs/gh-refuse-workflow.adoc similarity index 100% rename from asciidocs/gh-refuse-workflow.adoc rename to asciidocs/docs/gh-refuse-workflow.adoc diff --git a/asciidocs/images/ci-cd-cd-atlassian.png b/asciidocs/docs/images/ci-cd-cd-atlassian.png similarity index 100% rename from asciidocs/images/ci-cd-cd-atlassian.png rename to asciidocs/docs/images/ci-cd-cd-atlassian.png diff --git a/asciidocs/images/ci-delivery-deployment.png b/asciidocs/docs/images/ci-delivery-deployment.png similarity index 100% rename from asciidocs/images/ci-delivery-deployment.png rename to asciidocs/docs/images/ci-delivery-deployment.png diff --git a/asciidocs/images/cicd-pipeline.png b/asciidocs/docs/images/cicd-pipeline.png similarity index 100% rename from asciidocs/images/cicd-pipeline.png rename to asciidocs/docs/images/cicd-pipeline.png diff --git a/asciidocs/images/firewall-001.png b/asciidocs/docs/images/firewall-001.png similarity index 100% rename from asciidocs/images/firewall-001.png rename to asciidocs/docs/images/firewall-001.png diff --git a/asciidocs/images/firewall-002.png b/asciidocs/docs/images/firewall-002.png similarity index 100% rename from asciidocs/images/firewall-002.png rename to asciidocs/docs/images/firewall-002.png diff --git a/asciidocs/images/firewall-003.png b/asciidocs/docs/images/firewall-003.png similarity index 100% rename from asciidocs/images/firewall-003.png rename to asciidocs/docs/images/firewall-003.png diff --git a/asciidocs/images/firewall-004.png b/asciidocs/docs/images/firewall-004.png similarity index 100% rename from asciidocs/images/firewall-004.png rename to asciidocs/docs/images/firewall-004.png diff --git a/asciidocs/images/firewall-005.png b/asciidocs/docs/images/firewall-005.png similarity index 100% rename from asciidocs/images/firewall-005.png rename to asciidocs/docs/images/firewall-005.png diff --git a/asciidocs/images/firewall-006.png b/asciidocs/docs/images/firewall-006.png similarity index 100% rename from asciidocs/images/firewall-006.png rename to asciidocs/docs/images/firewall-006.png diff --git a/asciidocs/images/firewall-007.png b/asciidocs/docs/images/firewall-007.png similarity index 100% rename from asciidocs/images/firewall-007.png rename to asciidocs/docs/images/firewall-007.png diff --git a/asciidocs/images/gh-actions-001.png b/asciidocs/docs/images/gh-actions-001.png similarity index 100% rename from asciidocs/images/gh-actions-001.png rename to asciidocs/docs/images/gh-actions-001.png diff --git a/asciidocs/images/gh-actions-002.png b/asciidocs/docs/images/gh-actions-002.png similarity index 100% rename from asciidocs/images/gh-actions-002.png rename to asciidocs/docs/images/gh-actions-002.png diff --git a/asciidocs/images/gh-secret.png b/asciidocs/docs/images/gh-secret.png similarity index 100% rename from asciidocs/images/gh-secret.png rename to asciidocs/docs/images/gh-secret.png diff --git a/asciidocs/images/gh-secret1.png b/asciidocs/docs/images/gh-secret1.png similarity index 100% rename from asciidocs/images/gh-secret1.png rename to asciidocs/docs/images/gh-secret1.png diff --git a/asciidocs/images/gh-secret2.png b/asciidocs/docs/images/gh-secret2.png similarity index 100% rename from asciidocs/images/gh-secret2.png rename to asciidocs/docs/images/gh-secret2.png diff --git a/asciidocs/images/gh-secret2a.png b/asciidocs/docs/images/gh-secret2a.png similarity index 100% rename from asciidocs/images/gh-secret2a.png rename to asciidocs/docs/images/gh-secret2a.png diff --git a/asciidocs/images/gh-secret3.png b/asciidocs/docs/images/gh-secret3.png similarity index 100% rename from asciidocs/images/gh-secret3.png rename to asciidocs/docs/images/gh-secret3.png diff --git a/asciidocs/images/gh-secret3a.png b/asciidocs/docs/images/gh-secret3a.png similarity index 100% rename from asciidocs/images/gh-secret3a.png rename to asciidocs/docs/images/gh-secret3a.png diff --git a/asciidocs/images/github-ssh.png b/asciidocs/docs/images/github-ssh.png similarity index 100% rename from asciidocs/images/github-ssh.png rename to asciidocs/docs/images/github-ssh.png diff --git a/asciidocs/images/oracle-cloud-001.png b/asciidocs/docs/images/oracle-cloud-001.png similarity index 100% rename from asciidocs/images/oracle-cloud-001.png rename to asciidocs/docs/images/oracle-cloud-001.png diff --git a/asciidocs/images/oracle-cloud-002.png b/asciidocs/docs/images/oracle-cloud-002.png similarity index 100% rename from asciidocs/images/oracle-cloud-002.png rename to asciidocs/docs/images/oracle-cloud-002.png diff --git a/asciidocs/images/oracle-cloud-003.png b/asciidocs/docs/images/oracle-cloud-003.png similarity index 100% rename from asciidocs/images/oracle-cloud-003.png rename to asciidocs/docs/images/oracle-cloud-003.png diff --git a/asciidocs/images/oracle-cloud-004.png b/asciidocs/docs/images/oracle-cloud-004.png similarity index 100% rename from asciidocs/images/oracle-cloud-004.png rename to asciidocs/docs/images/oracle-cloud-004.png diff --git a/asciidocs/images/oracle-cloud-004a.png b/asciidocs/docs/images/oracle-cloud-004a.png similarity index 100% rename from asciidocs/images/oracle-cloud-004a.png rename to asciidocs/docs/images/oracle-cloud-004a.png diff --git a/asciidocs/images/oracle-cloud-005.png b/asciidocs/docs/images/oracle-cloud-005.png similarity index 100% rename from asciidocs/images/oracle-cloud-005.png rename to asciidocs/docs/images/oracle-cloud-005.png diff --git a/asciidocs/images/oracle-cloud-005a.png b/asciidocs/docs/images/oracle-cloud-005a.png similarity index 100% rename from asciidocs/images/oracle-cloud-005a.png rename to asciidocs/docs/images/oracle-cloud-005a.png diff --git a/asciidocs/images/oracle-cloud-006.png b/asciidocs/docs/images/oracle-cloud-006.png similarity index 100% rename from asciidocs/images/oracle-cloud-006.png rename to asciidocs/docs/images/oracle-cloud-006.png diff --git a/asciidocs/images/oracle-cloud-007.png b/asciidocs/docs/images/oracle-cloud-007.png similarity index 100% rename from asciidocs/images/oracle-cloud-007.png rename to asciidocs/docs/images/oracle-cloud-007.png diff --git a/asciidocs/images/oracle-cloud-007a.png b/asciidocs/docs/images/oracle-cloud-007a.png similarity index 100% rename from asciidocs/images/oracle-cloud-007a.png rename to asciidocs/docs/images/oracle-cloud-007a.png diff --git a/asciidocs/images/oracle-cloud-008.png b/asciidocs/docs/images/oracle-cloud-008.png similarity index 100% rename from asciidocs/images/oracle-cloud-008.png rename to asciidocs/docs/images/oracle-cloud-008.png diff --git a/asciidocs/images/quarkus-001.png b/asciidocs/docs/images/quarkus-001.png similarity index 100% rename from asciidocs/images/quarkus-001.png rename to asciidocs/docs/images/quarkus-001.png diff --git a/asciidocs/images/quarkus-002.png b/asciidocs/docs/images/quarkus-002.png similarity index 100% rename from asciidocs/images/quarkus-002.png rename to asciidocs/docs/images/quarkus-002.png diff --git a/asciidocs/images/quarkus-project-ciyml.png b/asciidocs/docs/images/quarkus-project-ciyml.png similarity index 100% rename from asciidocs/images/quarkus-project-ciyml.png rename to asciidocs/docs/images/quarkus-project-ciyml.png diff --git a/asciidocs/images/secret01.png b/asciidocs/docs/images/secret01.png similarity index 100% rename from asciidocs/images/secret01.png rename to asciidocs/docs/images/secret01.png diff --git a/asciidocs/images/secret02.png b/asciidocs/docs/images/secret02.png similarity index 100% rename from asciidocs/images/secret02.png rename to asciidocs/docs/images/secret02.png diff --git a/asciidocs/images/secret03.png b/asciidocs/docs/images/secret03.png similarity index 100% rename from asciidocs/images/secret03.png rename to asciidocs/docs/images/secret03.png diff --git a/asciidocs/images/secret04.png b/asciidocs/docs/images/secret04.png similarity index 100% rename from asciidocs/images/secret04.png rename to asciidocs/docs/images/secret04.png diff --git a/asciidocs/images/ssh-in-filezilla-002.png b/asciidocs/docs/images/ssh-in-filezilla-002.png similarity index 100% rename from asciidocs/images/ssh-in-filezilla-002.png rename to asciidocs/docs/images/ssh-in-filezilla-002.png diff --git a/asciidocs/images/ssh-in-filezilla.png b/asciidocs/docs/images/ssh-in-filezilla.png similarity index 100% rename from asciidocs/images/ssh-in-filezilla.png rename to asciidocs/docs/images/ssh-in-filezilla.png diff --git a/asciidocs/index.adoc b/asciidocs/docs/index.adoc similarity index 100% rename from asciidocs/index.adoc rename to asciidocs/docs/index.adoc diff --git a/asciidocs/plantuml/pipeline.puml b/asciidocs/docs/plantuml/pipeline.puml similarity index 100% rename from asciidocs/plantuml/pipeline.puml rename to asciidocs/docs/plantuml/pipeline.puml diff --git a/asciidocs/plantuml/pipeline2.puml b/asciidocs/docs/plantuml/pipeline2.puml similarity index 100% rename from asciidocs/plantuml/pipeline2.puml rename to asciidocs/docs/plantuml/pipeline2.puml diff --git a/asciidocs/ssh.adoc b/asciidocs/docs/ssh.adoc similarity index 100% rename from asciidocs/ssh.adoc rename to asciidocs/docs/ssh.adoc diff --git a/asciidocs/themes/favicon.ico b/asciidocs/docs/themes/favicon.ico similarity index 100% rename from asciidocs/themes/favicon.ico rename to asciidocs/docs/themes/favicon.ico diff --git a/asciidocs/themes/favicon.png b/asciidocs/docs/themes/favicon.png similarity index 100% rename from asciidocs/themes/favicon.png rename to asciidocs/docs/themes/favicon.png diff --git a/asciidocs/scripts/PLEASE_DO_NOT_TOUCH.txt b/asciidocs/scripts/PLEASE_DO_NOT_TOUCH.txt new file mode 100644 index 0000000..e69de29 diff --git a/asciidocs/scripts/docker-convert-util.sh b/asciidocs/scripts/docker-convert-util.sh new file mode 100755 index 0000000..4c2dd0c --- /dev/null +++ b/asciidocs/scripts/docker-convert-util.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +convertFilesToSlides() { + buildPath=$1 + asciidoctorVersion=$2 + + echo "=== compiling HTML - slides ===" + echo $buildPath + + downloadReveal $buildPath + + docker run --rm \ + -v ${PWD}/$buildPath/slides:/documents \ + asciidoctor/docker-asciidoctor:$asciidoctorVersion /bin/bash -c "asciidoctor-revealjs \ + -r asciidoctor-diagram \ + -a icons=font \ + -a revealjs_theme=league@ \ + -a imagesdir=images@ \ + -a revealjsdir=revealjs \ + -a source-highlighter=rouge@ \ + -a revealjs_slideNumber=c/t@ \ + -a revealjs_transition=slide@ \ + -a revealjs_hash=true@ \ + -a sourcedir=src/main/java@ \ + -b revealjs \ + '**/*.adoc'" +} + +downloadReveal() { + buildPath=$1 + REVEAL_VERSION="5.0.0" + REVEAL_DIR="$buildPath/slides" + curl -L https://github.com/hakimel/reveal.js/archive/$REVEAL_VERSION.zip --output revealjs.zip + unzip revealjs.zip + + mv reveal.js-$REVEAL_VERSION ./$REVEAL_DIR/revealjs + rm revealjs.zip +} + + + +convertFilesToHTML() { + buildPath=$1 + asciidoctorVersion=$2 + + echo "=== compiling HTML - docs ===" + echo $buildPath + + docker run --rm \ + -v ${PWD}/$buildPath/docs:/documents \ + asciidoctor/docker-asciidoctor:$asciidoctorVersion /bin/bash -c "asciidoctor \ + -r asciidoctor-diagram \ + -a icons=font \ + -a experimental=true \ + -a source-highlighter=rouge \ + -a rouge-theme=github \ + -a rouge-linenums-mode=inline \ + -a docinfo=shared \ + -a imagesdir=images \ + -a toc=left \ + -a toclevels=2 \ + -a sectanchors=true \ + -a sectnums=true \ + -a favicon=themes/favicon.png \ + -a sourcedir=src/main/java \ + -b html5 \ + '**/*.adoc'" + + mv $buildPath/docs/* $buildPath + rmdir $buildPath/docs + # rm -f -v $buildPath/**/*.adoc + #echo $buildPath/**/*.adoc + find $buildPath -depth -name "*.adoc" -print + find $buildPath -depth -name "*.adoc" -delete + + #docker run --rm \ + # -v ${PWD}/$buildPath:/documents \ + # asciidoctor/docker-asciidoctor:1.58 /bin/bash -c "tree && ls -lh" +} diff --git a/asciidocs/scripts/docker-convert.sh b/asciidocs/scripts/docker-convert.sh new file mode 100755 index 0000000..612deae --- /dev/null +++ b/asciidocs/scripts/docker-convert.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +inputPath="$1" +createSlides="$2" +source $inputPath/scripts/docker-convert-util.sh +ASCIIDOCTOR_VERSION="1.58" + +echo "input => $inputPath" +echo "createSlides => $createSlides" +echo building html + +if [ $createSlides = true ]; then + convertFilesToSlides "$inputPath" $ASCIIDOCTOR_VERSION +fi + +#inputPath="$inputPath" + +convertFilesToHTML "$inputPath" $ASCIIDOCTOR_VERSION + +# set permissions of output folder to the same as the input folder - fixes #1 +#if [ -d "$inputPath" ] && [ -d "$outputPath" ]; then +# chown $(stat "$inputPath" -c %u:%g) "$outputPath" -R +#fi diff --git a/asciidocs/slides/css/atom-one-light.css b/asciidocs/slides/css/atom-one-light.css new file mode 100644 index 0000000..6301562 --- /dev/null +++ b/asciidocs/slides/css/atom-one-light.css @@ -0,0 +1 @@ +.hljs{display:block;overflow-x:auto;padding:.5em;color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#a626a4}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta-string{color:#50a14f}.hljs-built_in,.hljs-class .hljs-title{color:#c18401}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#986801}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#4078f2}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}.hljs-link{text-decoration:underline} \ No newline at end of file diff --git a/asciidocs/slides/css/presentation.css b/asciidocs/slides/css/presentation.css new file mode 100644 index 0000000..249f207 --- /dev/null +++ b/asciidocs/slides/css/presentation.css @@ -0,0 +1,13 @@ +/*https://github.com/asciidoctor/asciidoctor-reveal.js/issues/199*/ +.reveal section img { + border: 0; + box-shadow: none; +} +.font-smaller { + font-size: smaller; +} +.font-larger { + font-size: larger; +} + +.reveal .lightbg { background: #fff8f1d0; } diff --git a/asciidocs/slides/demo.adoc b/asciidocs/slides/demo.adoc new file mode 100644 index 0000000..9ed9e81 --- /dev/null +++ b/asciidocs/slides/demo.adoc @@ -0,0 +1,138 @@ += Some Slide +:author: firstname lastname +:email: x.y@htl.at +:revnumber: 1.0 +:revdate: {docdate} +:revremark: SLIDEDEMO @ HTL Leonding +:encoding: utf-8 +:lang: de +:doctype: article +//:icons: font +:customcss: css/presentation.css +//:revealjs_customtheme: css/sky.css +//:revealjs_customtheme: css/black.css +:revealjs_width: 1408 +:revealjs_height: 792 +:source-highlighter: highlightjs +//:revealjs_parallaxBackgroundImage: images/background-landscape-light-orange.jpg +//:revealjs_parallaxBackgroundSize: 4936px 2092px +//:highlightjs-theme: css/atom-one-light.css +// we want local served font-awesome fonts +:iconfont-remote!: +:iconfont-name: fonts/fontawesome/css/all +//:revealjs_parallaxBackgroundImage: background-landscape-light-orange.jpg +//:revealjs_parallaxBackgroundSize: 4936px 2092px +ifdef::env-ide[] +:imagesdir: ../images +endif::[] +ifndef::env-ide[] +:imagesdir: images +endif::[] +//:revealjs_theme: sky +//:title-slide-background-image: img.png +:title-slide-transition: zoom +:title-slide-transition-speed: fast + +Testing filter by changing documentation file + +== Slide w/ image + +[.stretch] +image::img.png[] + +[.lightbg,background-opacity="0.7"] +== Slide w/ text and background image + +image::img.png[background, size="contain"] + + +* Topic 1 +* Topic 2 +* Topic 3 + +[%auto-animate] +== ! + +Matched element will be animated automatically! + +[%auto-animate] +== ! + +[.highlight] +Matched element will be animated automatically! + +And move to the right position! + +[%hardbreaks] +⬆️ +⬆️ +⬆️ + + +[%auto-animate] +== ! + +[source%linenums,js,data-id=planets] +---- +let planets = [ + { name: 'mars', diameter: 6779 }, +] +---- + +[%auto-animate] +== ! + +[source%linenums,js,data-id=planets] +---- +let planets = [ + { name: 'mars', diameter: 6779 }, + { name: 'earth', diameter: 12742 }, + { name: 'jupiter', diameter: 139820 } +] +---- + +[%auto-animate] +== ! + +[source%linenums,js,data-id=planets] +---- +let circumferenceReducer = ( c, planet ) => { + return c + planet.diameter * Math.PI; +} + +let planets = [ + { name: 'mars', diameter: 6779 }, + { name: 'earth', diameter: 12742 }, + { name: 'jupiter', diameter: 139820 } +] + +let c = planets.reduce( circumferenceReducer, 0 ) +---- + + +[%auto-animate,auto-animate-unmatched=false] +== Unmatched + +Introduction. (matched) + +[%auto-animate,auto-animate-unmatched=false] +== Unmatched + +Introduction. (matched) + +This will be shown instantly ⚡ (unmatched) + + +[%auto-animate,auto-animate-duration=5] +== Duration + +This animation... + +[%auto-animate,auto-animate-duration=5] +== Duration + +This animation... + +...will take 5 seconds! ⌚ + + diff --git a/asciidocs/slides/images/img.png b/asciidocs/slides/images/img.png new file mode 100644 index 0000000..45cf076 Binary files /dev/null and b/asciidocs/slides/images/img.png differ diff --git a/build-html-docker-inside-docker.sh b/build-html-docker-inside-docker.sh deleted file mode 100755 index 3c55cc8..0000000 --- a/build-html-docker-inside-docker.sh +++ /dev/null @@ -1,98 +0,0 @@ -echo start building html -set -e -# copy to gh-pages -BUILD_DIR="gh-pages" -rm -rf -v $BUILD_DIR # else plantuml diagrams won't be rebuilt -# do not copy revealjs -mkdir -p $BUILD_DIR -cp -r -p -v asciidocs/docinfo.html $BUILD_DIR -cp -r -p -v asciidocs/.nojekyll $BUILD_DIR -cp -r -p -v asciidocs/index.adoc $BUILD_DIR -cp -r -p -v asciidocs/*.adoc $BUILD_DIR -for d in $(find ./asciidocs -type d -maxdepth 1 -mindepth 1); do - cp -r -p -v asciidocs/${d##*/} $BUILD_DIR/${d##*/} -done -#uncomment it when you want to copy the source code into the gh-pages (for including source code into your document) -#cp -r -p -v src $BUILD_DIR - -CURRENT_FOLDER=${PWD} -echo "pwd -> ${CURRENT_FOLDER}" -echo "adoc-folder->${CURRENT_FOLDER}/${BUILD_DIR}/*.adoc" -asciidoctor \ - -r asciidoctor-diagram \ - -a icons=font \ - -a experimental=true \ - -a source-highlighter=rouge \ - -a rouge-theme=github \ - -a rouge-linenums-mode=inline \ - -a docinfo=shared \ - -a imagesdir=images \ - -a toc=left \ - -a toclevels=2 \ - -a sectanchors=true \ - -a sectnums=true \ - -a favicon=themes/favicon.png \ - -a sourcedir=src/main/java \ - -b html5 \ - "${CURRENT_FOLDER}/${BUILD_DIR}/*.adoc" -rm -rf ./.asciidoctor -rm -v $BUILD_DIR/docinfo.html -rm -rf -v $BUILD_DIR/*.adoc -echo Creating html-docs in asciidocs in Docker finished ... - -for d in $(find ${BUILD_DIR}/ -type d -maxdepth 1 -mindepth 1); do - echo searching in ${d} -adoc=$(find ${d} -type f -name "*.adoc") -if [[ (-n $adoc) ]] -then - BUILD_DIR="${d}" - asciidoctor \ - -r asciidoctor-diagram \ - -a icons=font \ - -a experimental=true \ - -a source-highlighter=rouge \ - -a rouge-theme=github \ - -a rouge-linenums-mode=inline \ - -a docinfo=shared \ - -a imagesdir=images \ - -a toc=left \ - -a toclevels=2 \ - -a sectanchors=true \ - -a sectnums=true \ - -a favicon=themes/favicon.png \ - -a sourcedir=src/main/java \ - -b html5 \ - "${BUILD_DIR}/*.adoc" - echo "${d} htmls created" - rm -rf -v $BUILD_DIR/*.adoc -fi -done - -# https://github.com/asciidoctor/docker-asciidoctor - -# source-highlighter [highlightjs,rouge,coderay,prettify, pygments] - -# Rouge -# https://asciidoctor.org/docs/user-manual/#rouge -# rouge-style [base16,bw,colorful,github,gruvbox,igor_pro,magritte,molokai,monokai,monokai_sublime,pastie,thankful_eyes,tulip] -# -a source-highlighter=rouge \ -# -a rouge-theme=gruvbox \ -# -a rouge-linenums-mode=inline \ -# -a docinfo=shared \ - - -# Highlightjs -# -a source-highlighter=highlightjs \ -# -a highlightjsdir=highlight \ -# -a highlightjs-theme=gruvbox-dark \ - -#Pygmrnts -# pygments ist derzeit nicht im docker-image enthalten, da im docker image nur python3 verfügbar ist -# -a source-highlighter=pygments \ -# -a pygments-style=emacs \ - -# Creating a Dockerized Hugo + AsciiDoctor Toolchain -# https://rgielen.net/posts/2019/creating-a-dockerized-hugo-asciidoctor-toolchain/ -# https://rgielen.net/posts/2019/creating-a-blog-with-hugo-and-asciidoctor/ - - diff --git a/config.sh b/config.sh new file mode 100755 index 0000000..6f84372 --- /dev/null +++ b/config.sh @@ -0,0 +1,3 @@ +SLIDES=false +INPUTPATH=asciidocs +OUTPUTPATH=dist diff --git a/img/adoc-to-html.png b/img/adoc-to-html.png new file mode 100644 index 0000000..80d185a Binary files /dev/null and b/img/adoc-to-html.png differ diff --git a/img/permissions-for-asciidoc-2.png b/img/permissions-for-asciidoc-2.png new file mode 100644 index 0000000..cb91b21 Binary files /dev/null and b/img/permissions-for-asciidoc-2.png differ diff --git a/img/permissions-for-asciidoc.png b/img/permissions-for-asciidoc.png new file mode 100644 index 0000000..49a7bdb Binary files /dev/null and b/img/permissions-for-asciidoc.png differ diff --git a/local-convert.sh b/local-convert.sh new file mode 100755 index 0000000..c6e15e7 --- /dev/null +++ b/local-convert.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +source config.sh + +inputDir=$INPUTPATH +outputDir=$OUTPUTPATH +convertSlides=$SLIDES + +echo "inputDir => $inputDir" +echo "outputDir => $outputDir" +echo "convertSlides => $convertSlides" + +if [[ "$outputDir" == *\/* ]] || [[ "$outputDir" == *\\* ]] +then + echo "you should use direct subdirectories of the current folder ... exiting" + exit 1 +fi + + +if [ -d "$inputDir" ]; +then + rm -rf $outputDir + mkdir $outputDir + echo "copying '$inputDir' to '$outputDir'" + cp -r -v $inputDir/ $outputDir + pwd + ./$outputDir/scripts/docker-convert.sh $outputDir $convertSlides +else + echo "Error: ${inputDir} not found. Cannot continue ..." +fi + diff --git a/publish-gh-pages-inside-docker.sh b/publish-gh-pages-inside-docker.sh deleted file mode 100755 index 5735e34..0000000 --- a/publish-gh-pages-inside-docker.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# DO NOT USE -# OR RATHER READ IT AND THEN USE -# ONLY WORKS FROM THE PROJECT DIR -# WILL PUBLISH STUFF ON THE WEBSITE, DON'T SCREW UP -BUILD_DIR="gh-pages" -echo "BUILD_DIR->${BUILD_DIR}" -OLD=${PWD} -echo "OLD->${OLD}" -ORIGIN_URL=$(git config --get remote.origin.url) -echo "ORIGIN_URL->${ORIGIN_URL}" -echo "->${PWD}/build-html-docker-inside-docker.sh" -${PWD}/build-html-docker-inside-docker.sh -#echo "*******************************" -#ls -lah ${OLD}/${BUILD_DIR} -#echo "*******************************" -#exit 0 -cd $BUILD_DIR -echo "GIT_GLOBAL_MAIL->${GIT_GLOBAL_MAIL}" -echo "GIT_GLOBAL_USER_NAME->${GIT_GLOBAL_USER_NAME}" -git config --global user.email ${GIT_GLOBAL_MAIL} -git config --global user.name ${GIT_GLOBAL_USER_NAME} -git init -git add . -git commit -m "$USER - rebuilding gh-pages $(date)" -git remote add origin $ORIGIN_URL - - -# echo gh-pages url -IFS='/' read -ra TEMP <<< "$ORIGIN_URL" -#for i in "${TEMP[@]}"; do -# # process "$i" -# echo "$i" -#done -REPO_NAME=${TEMP[4]} -echo -echo "***********************************************************" -echo trying to create gh-pages under following url -echo https://${TEMP[3]}.github.io/${REPO_NAME%.*} -echo "***********************************************************" - - -# Sources: -# https://stackoverflow.com/a/965072 -# https://stackoverflow.com/a/918931 -# maybe better with subtrees -> https://gist.github.com/cobyism/4730490 -# https://blog.bloomca.me/2017/12/15/how-to-push-folder-to-github-pages.html diff --git a/publish.sh b/publish.sh new file mode 100755 index 0000000..856f794 --- /dev/null +++ b/publish.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +source ./local-convert.sh + +echo $SLIDES +echo $INPUTPATH +echo $OUTPUTPATH +# sudo chown ${USER}:${USER} dist + +remote=$(git remote get-url origin) +cd "$OUTPUTPATH" || exit + +rm -rf .git + +git init + +git add . + +git commit -m "updating github pages" + +git switch -c gh-pages + +git remote add origin "$remote" + +git push -f origin gh-pages