Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0224faf

Browse files
committed
Merge pull request hakimel#5 from ItGumby/readme
applying README changes from asciidoctor-backends
2 parents ba39637 + 89f40d9 commit 0224faf

File tree

1 file changed

+134
-56
lines changed

1 file changed

+134
-56
lines changed

README.adoc

Lines changed: 134 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,38 @@
11
== reveal.js Backend
22

3+
//image:https://travis-ci.org/asciidoctor/asciidoctor-reveal.js.svg?branch=master[Build Status, link="https://travis-ci.org/asciidoctor/asciidoctor-reveal.js"]
34
The https://github.com/asciidoctor/asciidoctor-reveal.js/[reveal.js backend] is a slim template which transforms an AsciiDoc document to HTML5 slides animated by http://lab.hakim.se/reveal-js/[reveal.js].
45

5-
=== Installation
6+
== Usage Instructions
67

7-
First, you should download (or git clone) the https://github.com/asciidoctor/asciidoctor-reveal.js/[asciidoctor-REVEAL.JS] repository to a convenient location.
8+
. Ensure Asciidoctor is installed
89

9-
git clone https://github.com/asciidoctor/asciidoctor-reveal.js
10+
$ gem install asciidoctor
1011

11-
Then from your working directory (that is where your AsciiDoc document resides) you must create a +reveal.js+ directory and copy there the +reveal.js+ file with its directories (plugin, css, ...).
12-
You could also just clone the https://github.com/hakimel/reveal.js[reveal.js] repository.
12+
. Clone `asciidoctor/asciidoctor-reveal.js` to get templates for rendering presentation HTML.
1313

14-
git clone git://github.com/hakimel/reveal.js.git
14+
$ git clone git://github.com/asciidoctor/asciidoctor-reveal.js.git
1515

16-
=== Settings
16+
. Edit `CONTENT_FILE` ( *.adoc or *.ad or ...)
17+
** Slides & content per slide
18+
** [Optional] Set presentation "options" at top of `CONTENT_FILE`. The options available & their values will depend on presentation library (some examples below).
1719

18-
There are some attributes that can be set at the top of the document which they are specific of +revealjs+ backend.
20+
ATTRIBUTE: ${value}
1921

20-
[NOTE]
21-
--
22-
Default settings are based on `reveal.js` default settings.
23-
--
22+
. Generate HTML from Asciidoctor Template
2423

25-
[options="header",cols="1m,1"]
26-
|===
27-
|Attribute |Description
28-
|:revealjs_theme: <theme> | Chooses one of reveal.js' https://github.com/hakimel/reveal.js#theming[built-in themes].
29-
Default: default
30-
|:revealjs_customtheme: <file\|URL> | Overrides CSS with given file or URL. Default is disabled.
31-
|:revealjs_controls: <true\|false> | Display controls in the bottom right corner. Default: true
32-
|:revealjs_progress: <true\|false> | Display a presentation progress bar. Default: true
33-
|:revealjs_slideNumber: <true\|false> | Display the page number of the current slide. Default: false
34-
|:revealjs_history: <true\|false> | Push each slide change to the browser history. Default: false
35-
|:revealjs_keyboard: <true\|false> | Enable keyboard shortcuts for navigation. Default: true
36-
|:revealjs_overview: <true\|false> | Enable the slide overview mode. Default: true
37-
|:revealjs_touch: <true\|false> | Enables touch navigation on devices with touch input. Default: true
38-
|:revealjs_center: <true\|false> | Vertical centering of slides. Default: true
39-
|:revealjs_loop: <true\|false> | Loop the presentation. Default: false
40-
|:revealjs_rtl: <true\|false> | Change the presentation direction to be RTL. Default: false
41-
|:revealjs_fragments: <true\|false> | Turns fragments on and off globally. Default: true
42-
|:revealjs_embedded: <true\|false> | Flags if the presentation is running in an embedded mode,
43-
i.e. contained within a limited portion of the screen. Default: false
44-
|:revealjs_autoSlide: <integer> | Number of milliseconds between automatically proceeding to the
45-
next slide, disabled when set to 0, this value can be overwritten
46-
by using a data-autoslide attribute on your slides. Default 0
47-
|:revealjs_autoSlideStoppable: <true\|false> | Stop auto-sliding after user input. Default: true
48-
|:revealjs_mouseWheel: <true\|false> | Enable slide navigation via mouse wheel. Default: false
49-
|:revealjs_hideAddressBar: <true\|false> | Hides the address bar on mobile devices. Default: true
50-
|:revealjs_previewLinks: <true\|false> | Opens links in an iframe preview overlay. Default: false
51-
|:revealjs_transition: <transition> | Transition style.
52-
Valid values: default/cube/page/concave/zoom/linear/fade/none
53-
|:revealjs_transitionSpeed: <speed> | Transition speed. Valid values: default/fast/slow
54-
|:revealjs_backgroundTransition: <transition>| Transition style for full page slide backgrounds.
55-
Valid values: default/none/slide/concave/convex/zoom
56-
|:revealjs_viewDistance: <integer> | Number of slides away from the current that are visible. Default: 3
57-
|:revealjs_parallaxBackgroundImage: <file\|URL> | Parallax background image. Defaults to none
58-
|:revealjs_parallaxBackgroundSize: <CSS size syntax>| Parallax background size (accepts any CSS syntax). Defaults to none
24+
** Command Line:
5925

60-
|===
26+
$ asciidoctor -T templates/slim ${options} CONTENT_FILE
6127

62-
If you want to build a custom theme or customize an existing one you should look at `reveal.js's` documentation and use `revealjs_theme` attribute: https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md
28+
** Build Script: use Ruby, JavaScript, Gradle, or your favorite build tool/script with presentation options
29+
. Copy or clone presentation library (to output destination/branch)
30+
31+
$ git clone git://github.com/hakimel/reveal.js.git
6332

64-
=== Examples
33+
TIP: if leveraging https://pages.github.com/[GitHub Pages], plan ahead by keeping your source files on `master` branch and all output files on `gh-pages` branch.
34+
35+
== Source Examples
6536

6637
// FIXME: incomplete
6738

@@ -182,16 +153,123 @@ Here is https://github.com/hakimel/reveal.js#markup[upstream documentation] on t
182153

183154
NOTE: The `reveal.js` backend only supports level 1 (`==`) and level 2 (`===`) sections. Level 3 sections are not supported and will not render correctly.
184155

185-
=== Rendering
156+
== reveal.js Options
157+
158+
There are some attributes that can be set at the top of the document which they are specific of +revealjs+ backend.
159+
160+
[NOTE]
161+
--
162+
Default settings are based on `reveal.js` default settings.
163+
--
164+
165+
[options="header",cols="1m,1,2"]
166+
|===
167+
|Attribute |Value(s) |Description
168+
169+
|:revealjs_theme:
170+
|*default*, beige, sky, night, serif, simple, solarized
171+
|Chooses one of reveal.js' https://github.com/hakimel/reveal.js#theming[built-in themes].
172+
173+
|:revealjs_customtheme:
174+
|<file\|URL>
175+
| Overrides CSS with given file or URL. Default is disabled.
186176

187-
First, make sure Asciidoctor is installed:
177+
|:revealjs_controls:
178+
|*true*, false
179+
|Display controls in the bottom right corner.
188180

189-
gem install asciidoctor
181+
|:revealjs_progress:
182+
|*true*, false
183+
|Display a presentation progress bar.
190184

191-
Then, to render your presentation as HTML5, simply execute the command:
185+
|:revealjs_slideNumber:
186+
|true, *false*
187+
|Display the page number of the current slide.
192188

193-
asciidoctor -T <backend directory> <asciidoc file>
189+
|:revealjs_history:
190+
|true, *false*
191+
|Push each slide change to the browser history.
194192

195-
So for the above revealjs backend you'd use
193+
|:revealjs_keyboard:
194+
|*true*, false
195+
|Enable keyboard shortcuts for navigation.
196196

197-
asciidoctor -T <base>/asciidoctor-reveal.js/template/slim <asciidoc file>
197+
|:revealjs_overview:
198+
|*true*, false
199+
|Enable the slide overview mode.
200+
201+
|:revealjs_touch:
202+
|*true*, false
203+
|Enables touch navigation on devices with touch input.
204+
205+
|:revealjs_center:
206+
|*true*, false
207+
|Vertical centering of slides.
208+
209+
|:revealjs_loop:
210+
|true, *false*
211+
|Loop the presentation.
212+
213+
|:revealjs_rtl:
214+
|true, *false*
215+
|Change the presentation direction to be RTL.
216+
217+
|:revealjs_fragments:
218+
|*true*, false
219+
|Turns fragments on and off globally.
220+
221+
|:revealjs_embedded:
222+
|true, *false*
223+
|Flags if the presentation is running in an embedded mode,
224+
i.e. contained within a limited portion of the screen.
225+
226+
|:revealjs_autoSlide:
227+
|<integer>
228+
| Delay in milliseconds between automatically proceeding to the
229+
next slide. +
230+
Disabled when set to *0* (the default). +
231+
This value can be overwritten by using a `data-autoslide` attribute on your slides.
232+
233+
|:revealjs_autoSlideStoppable:
234+
|*true*, false
235+
|Stop auto-sliding after user input.
236+
237+
|:revealjs_mouseWheel:
238+
|true, *false*
239+
|Enable slide navigation via mouse wheel.
240+
241+
|:revealjs_hideAddressBar:
242+
|*true*, false
243+
|Hides the address bar on mobile devices.
244+
245+
|:revealjs_previewLinks:
246+
|true, *false*
247+
|Opens links in an iframe preview overlay.
248+
249+
|:revealjs_transition:
250+
|*default*, cube, page, concave, zoom, linear, fade, none
251+
|Transition style.
252+
253+
|:revealjs_transitionSpeed:
254+
|*default*, fast, slow
255+
|Transition speed.
256+
257+
|:revealjs_backgroundTransition:
258+
|*default*, none, slide, concave, convex, zoom
259+
| Transition style for full page slide backgrounds.
260+
261+
|:revealjs_viewDistance:
262+
|<integer>
263+
|Number of slides away from the current that are visible. Default: 3
264+
265+
|:revealjs_parallaxBackgroundImage:
266+
|<file\|URL>
267+
|Parallax background image. Defaults to none
268+
269+
|:revealjs_parallaxBackgroundSize:
270+
|<CSS size syntax>
271+
|Parallax background size (accepts any CSS syntax). Defaults to none
272+
273+
|===
274+
275+
If you want to build a custom theme or customize an existing one you should look at `reveal.js's` documentation and use `revealjs_theme` attribute: https://github.com/hakimel/reveal.js/blob/master/css/theme/README.md

0 commit comments

Comments
 (0)