node-reveal
node-reveal copied to clipboard
🎁A reveal.js cli
@vivaxy/reveal
🎁 A reveal.js cli
Feature
Based on reveal.js.
- Easy to setup. No cloning repositories. No template files.
- Markdown files as slides content.
- Sync sliding between clients.
- Auto reload when markdown file changes.
- Speaker view.
- Theme config.
- Inline html.
Notable Markdown Syntax
- Use
\r?\n----\r?\n
as horizontal slides separator. - Use
\r?\n---\r?\n
as vertical slides separator. - Use
^Note:
as speaker notes separator. - Use
<!-- .slide: data-background="#ff0000" -->
to customize slide styles. - Use
<!-- .element: style="width: 60%;" -->
to customize element styles. - Use
<!-- .element: class="fragment" -->
to create fragment.
Basic Usage
npx
npx @vivaxy/reveal server --markdown /path/to/presentation.md
Keyboard Shortcuts
-
Space
: Next -
Up
,Down
,Left
,Right
: Navigation -
k
,j
,h
,l
: Navigation -
f
: Full-screen -
s
: Show slide notes -
o
: Toggle overview -
.
(Period
,b
,v
or/
): Turn screen black -
Esc
: Escape from full-screen, or toggle overview -
alt + Left Click
: Toggle zoom -
p
,n
: Previous and next
Advanced Usage
Commands
server
Basic Usage
reveal server \
--markdown ./ppt/reveal.md \
--theme solarized \
--highlight-theme solarized-light \
--transition slide \
--port 8080 \
--watch \
--separator '^\r?\n----\r?\n$' \
--separator-vertical '^\r?\n---\r?\n$' \
--separator-notes '^Note:' \
--width 1440 \
--height 900 \
--log-level 2 \
--script 'custom.js'
Options
Name | Type | Required | Default | Description |
---|---|---|---|---|
--markdown |
string | ✔ | N/A | markdown file |
--theme |
string | ✖ | solarized |
reveal.js theme |
--highlight-theme |
string | ✖ | solarized-light |
highlight.js theme |
--transition |
string | ✖ | slide |
reveal.js transitions styles |
--port |
number | ✖ | 0 |
server port |
--watch |
boolean | ✖ | false |
reload when markdown changed |
--separator |
string | ✖ | ^\r?\n----\r?\n$ |
horizontal slides separator |
--separator-vertical |
string | ✖ | ^\r?\n---\r?\n$ |
vertical slides separator |
--separator-notes |
string | ✖ | ^Note: |
speaker notes separator |
--width |
number | ✖ | 1440 | slide width |
--height |
number | ✖ | 900 | slide height |
--log-level |
number/string | ✖ | 2 |
log output level |
--script |
string | ✖ | '' | insert custom script before head |
URL Parameters
print-pdf
Used to print as pdf files.
Add ?print-pdf&showNotes=true
, like: http://127.0.0.1:3000/?print-pdf#/
.
Press Ctrl/Command + p
to open print dialog.
Usually, print-pdf
is used with showNotes
, like http://127.0.0.1:3000/?print-pdf&showNotes=separate-page#/
showNotes
Show speakers notes.
Add ?showNotes=true
, like: http://127.0.0.1:3000/?showNotes=true#/
.
Support
node >= v12
Change Log
See CHANGELOG.md.