Skip to content

a template project for presentations written in asciidoc using reveal.js

Notifications You must be signed in to change notification settings

Maurice-Mueller/asciidoc_presentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asciidoc Presentation

This project is a quick start project for using Asciidoctor with the Reveal.js plugin. It also utilizes Decktape.js to render the slides to a pdf.

Using

This project relies on bundler (the standard dependency manager in ruby).

gem install bundler

Setup

  • bundle install

  • without Decktape.js: bundle exec rake init

  • with Decktape.js: bundle exec rake init-all

If you want to use Decktape.js you need npm to be installed and accessible from your terminal.

If you want to use Cordova and build a mobile app as well, please refer to section Cordova.

Build

  • bundle exec rake build

    • this will build only the Reveal.js version

  • bundle exec rake build-all

    • this will build pdf, html, slides-pdf, reveal.js

Run

  • to start the presentation simply open the file out/revealjs/project_name.html

Settings

All relevant settings are found in config.rb.

Standard directory layout

src/
  -- asciidoc/
  -- resources/
     -- images/
     -- videos/
     -- generated/
     -- pdf_images_dir/
out/
  -- html/
  -- pdf/
  -- revealjs/
  -- slides-pdf/

All files under resources/images, resources/videos and _resources/generated are copied to {reveal-js-out-dir}/static and src/resources/pdf_images_dir. So you should avoid having conflicting names (i.e. files that have the same name).

src/resources/pdf_images_dir is needed because asciidoctor-pdf can not look in multiple directories for resources. This directory is on gitignore.

In resources/generated are all generated files (e.g. pictures from plantuml embedded in asciidoc). This directory is also on gitignore.

Gradle / Java

On branch gradle-java you will find a quick start project for using the presentation project with java source code.

Before you start, you should execute ./gradlew initAll (or bundle install && bundle exec rake init-all).

Compile Java and Reveal.js

./gradlew build

  • the Reveal.js task will run after the build task

Build all output formats

./gradlew buildAll

Change project name

settings.gradle contains the project name.

Custom Macros

You can find example macros under build-scripts/extensions.rb. The macros in action can be seen in the presentation itself.

Added macro

Fragments

You can tag whole blocks as a fragment with the following:

fragment::begin[]
Stuff, that should be revealed during presentation.
fragment::end[]

In default asciidoctor revealjs, you can only tag lists with [%step] to make each bullet an own fragment.

Speaker Only Notes

If you want to add speaker notes that should not be included in the other output formats:

speaker-only::begin[]
Your notes...
speaker-only::end[]

This will transform to [NOTE.speaker] for backend revealjs and to a block comment for all other backends (and thus not included in the output).

Slide break

If you want to have a new slide without a title:

slidebreak::[]

This will be transformed to === ! for backend revealjs and for all other backends it will be dropped.

Slides only

If you want to have some things only on the slides (and slides pdf) you can use the following:

slides-only::begin[]
Slides only stuff
slides-only::end[]

Mobile App

Currently, this is under development!

Quick Start

bundle exec rake install-cordova
bundle exec rake init-cordova
bundle exec rake build-cordova
bundle exec rake run-cordova

Install the SDKs

You have to have the platform SDK already installed. In the background cordova is used to create a mobile app.

E.g. install the latest Android SDK under OS X:

brew cask install android-sdk
sdkmanager "platform-tools" "platforms;android-26"
sdkmanager "build-tools;26.0.2"

For more information see here.

Install Cordova

If you don’t have Cordova already installed you can use one of the following methods:

  • either: bundle exec install-cordova

  • or: npm install -g cordova

Init Cordova

bundle exec init-cordova

  • a cordova project will be created under out/cordova

  • all platforms mentioned in config.rb will be added

Run Cordova

  • plug in your phone

  • run bundle exec run-cordova

About

a template project for presentations written in asciidoc using reveal.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published