Docker convenience wrapper for Asciidoctor.
1.0K
Docker convenience wrapper for Asciidoctor.
The basic requirements:
Using Docker, script into Asciidoctor...
Asciidoctor Build is a Docker wrapper around Asciidoctor, you pass Asciidoctor options directly through to Asciidoctor.
Usage: [options]
Options:
-t Test, run "hello world" example [boolean]
-f Files, comma seperated file extensions to watch [default: adoc,asc,md]
-w Watch, rebuild the src directory onchange [default: false]
-e Execute, asciidoctor options call string [default: asciidoctor -h]
For the full range of Asciidoctor options to "execute" you'll need to reference the Asciidoctor docs
Asciidoctor Build can be found on Docker Hub...
The base Docker image comes preloaded with a "hello world" example, the basics should generate a directory/file called dist/hellowWorld.html
$ docker pull cdcabrera/asciidoctor-build
$ docker stop asciidoctor-build-test
$ docker run -it --rm -v "$(pwd)/dist:/output" --name asciidoctor-build-test cdcabrera/asciidoctor-build -t
Set it up within a NPM script. Where your output is a dist directory and your source is a src directory
"scripts": {
"dockerAsciidoc": "docker run -it --rm -v \"$(pwd)/src:/data\" -v \"$(pwd)/dist:/output\" --name asciidoctor-build cdcabrera/asciidoctor-build",
"example": "npm run dockerAsciidoc -w -e \"asciidoctor -t -dbook -a toc -v -o ../output/exampleOutputFileInDistDir.html ../data/exampleFileInSrcDir.adoc\""
}
Content type
Image
Digest
Size
368.3 MB
Last updated
over 7 years ago
docker pull cdcabrera/asciidoctor-build