scenario.adoc in hyla-1.0 vs scenario.adoc in hyla-1.0.1
- old
+ new
@@ -1,59 +1,152 @@
== Prerequisites
==== 1. Delete Temp directory
rm -rf ~/hyla/MyBlankProject/
+ rm -rf ~/hyla/MyBookProject
rm -rf ~/hyla/MyTocProject/
rm -rf ~/hyla/MyTrainingProject/
+ rm -rf ~/hyla/MyTrainingExercisesProject/
+ rm -rf ~/hyla/MyDeckSlideShow/
+ rm -rf ~/hyla/MyRevealSlideShow/
-== 1.Create a Blank Project
+==== 2. Install Gem Hyla 1.0.x
-=== 1. Create a new project
+ gem install hyla -v 1.0.x
- ./hyla new --blank ~/hyla/MyBlankProject
+== 1. Blank Project & Artefacts
-=== 2. Idem but with force option
+Using hyla we will create a new project (= directory) and add artefacts (article, audio, video, image, source, table)
- ./hyla new --blank ~/hyla/MyBlankProject --force
+== 1. Create a Blank Project (with or without --force option)
-=== 3. Add an artefact (article, audio, video)
+ hyla new --blank ~/hyla/MyBlankProject
+ hyla new --blank ~/hyla/MyBlankProject --force
- ./hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
- ./hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
- ./hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
- ./hyla create --t asciidoc --a source_highlight --d ~/hyla/MyBlankProject
+== 2. Create a Blank Project without _config.yaml config file, add artefact
+ cd ~/hyla
+ rm -rf MyBlankProject/
+ hyla new --blank MyBlankProject --force
+ hyla create --t asciidoc --a article --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a book --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a image --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a audio --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a video --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a source --d ~/hyla/MyBlankProject
+ hyla create --t asciidoc --a table --d ~/hyla/MyBlankProject
+
+== 3. Create a Blank Project using _config.yaml config file, add artefacts
+
+ cd ~/hyla
+ rm -rf MyBlankProject/
+ hyla new --blank MyBlankProject --force
+ cd MyBlankProject
+ hyla create --a article
+ hyla create --a book
+ hyla create --a image
+ hyla create --a audio
+ hyla create --a video
+ hyla create --a source
+ hyla create --a table
+
=== 4. Generate HTML Content of an existing project (asciidoc 2 html)
- ./hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content
+ hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content
+=== 5. Generate HTML Content of an existing project (asciidoc 2 html) with a different style
+
+ Styles available : redhat, asciidoctor, colony, foundation, foundation-lime, foundation-potion, github, golo, iconic, maker, readthedocs, riak, rocket-panda, rubygems
+
+ hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style redhat
+ hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style github
+ hyla generate --r adoc2html --s ~/hyla/MyBlankProject/ --d ~/hyla/MyBlankProject/generated_content --style foundation
+
+=== 6. Generate HTML Content within project
+
+ hyla generate --r adoc2html --s . --d generated_content
+
+=== 7. Generate HTML Content within project & using Config File
+
+ As destination directory is not longer '.' (which is the case when we add artefacts using `hyla create` command, then we must change the destination directory to `generated_content`. the original file is
+ still available as it will backuped by ruby
+
+ ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
+ hyla generate
+
+
== 2. Project from Template
=== 1. Create a project using a template (training)
- ./hyla new --force --t training ~/hyla/MyTrainingProject
- ./hyla new --force --t training-exercises ~/hyla/MyTrainingExercisesProject
+ hyla new --t training ~/hyla/MyTrainingProject --force
+ hyla new --t training-exercises ~/hyla/MyTrainingExercisesProject --force
+ hyla new --t book --force ~/hyla/MyBookProject --force
=== 2. Generate content and watch it
- ./hyla generate --r adoc2html --s ~/hyla/MyTrainingProject/ --d ~/hyla/MyTrainingProject/generated_content
+ cd ~/hyla/MyTrainingProject
+ ruby -i.bak -pe 'sub(%r{destination: .},"destination: generated_content")' _config.yml
+ hyla generate
- ./hyla watch --s ~/hyla/MyTrainingProject/ --d ~/hyla/MyTrainingProject/generated_content
+ hyla watch --s ~/hyla/MyTrainingProject/ --d ~/hyla/MyTrainingProject/generated_content
== 3. Table Of Content To asciidoc
=== 1. Generate an asciidoctor project from a Table of Content
- ./hyla generate --r toc2html --p my-project --d ~/hyla/MyTocProject/ --toc ~/MyProjects/hyla/data/toc.adoc
+ hyla generate --r toc2adoc --p my-project --d ~/hyla/MyTocProject/ --toc ~/MyProjects/hyla/data/toc.adoc
+ hyla generate --r adoc2html --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
- ./hyla generate --r adoc2html --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
+ hyla watch --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
- ./hyla watch --s ~/hyla/MyTocProject/ --d ~/hyla/MyTocProject/generated_content
+=== 2. Generate an asciidoctor project from a Table of Content using YAML config file and watch content
-== 4. Server content locally - HTTP Server
+ rm -rf ~/hyla/MyTocProject
+ cd ~/hyla
+ hyla new --blank MyTocProject
+ cd MyTocProject
+ hyla generate --r toc2adoc
- ./hyla serve -P 4000 -H localhost --out_dir ~/hyla/MyTrainingProject/generated_content/ -b /hyla/
+ # Change destination in config files or pass info as option
+ # cd ../MyTocProject/
+ # subl _config.yml
+ hyla generate --r adoc2html
+
+ hyla watch --s ~/hyla/MyTocProject/ --d generated_content
+
+== 4. Generate a DeckJS Slideshow from Table Of Content
+
+ hyla generate --backend deckjs --s ~/hyla/MyTocProject/A_Introduction_module/ --d ~/hyla/MyTocProject/A_Introduction_module/generated_content --r adoc2slide
+
+== 5. Server content locally - HTTP Server
+
+ hyla serve -P 4000 -H localhost --out_dir ~/hyla/MyTrainingProject/generated_content/ -b /hyla/
+
+== 6. Generate a Slideshow
+
+=== 1. DeckJS using a template
+
+ rm -rf ~/hyla/MyDeckSlideShow
+ cd ~/hyla
+ hyla new --blank MyDeckSlideShow
+ hyla create --t slideshow --a deckjs --d MyDeckSlideShow
+ hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r adoc2slide
+
+=== 2. Different DeckJS Style options
+
+ hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r adoc2slide --a deckjs_theme=swiss,deckjs_transition=fade
+ hyla generate --backend deckjs --s ~/hyla/MyDeckSlideShow --d ~/hyla/MyDeckSlideShow/generated_content --r adoc2slide --a deckjs_theme=web-2.0,deckjs_transition=horizontal-slide
+
+=== 3. RevealJS
+
+ rm -rf ~/hyla/MyRevealSlideShow
+ cd ~/hyla
+ hyla new --blank MyRevealSlideShow
+ hyla create --t slideshow --a revealjs --d MyRevealSlideShow
+ cd MyRevealSlideShow
+ hyla generate --backend revealjs --s . --d generated_content --r adoc2slide