0.0.5 • Published 3 years ago

revealjs-cli v0.0.5

Weekly downloads
16
License
MIT
Repository
github
Last release
3 years ago

Reveal.js CLI server

continuous integration workflow

NODE.JS DEPENDENCIES NODE.JS DEV DEPENDENCIES

Known Vulnerabilities

This tool is based on the awesome VSCode-Reveal.

This is the first tool I've used to create markdown presentations, and I like the way it's put together. The only thing I missed, was a way to call it from the command line, and have the same output as I do with the extension.

Here you can read my quick blog post about the possibilities of creating slideshows in Markdown.

Getting started

$ npm install revealjs-cli
$ revealjs-cli --help

Usage: revealjs-cli [options]

Options:
  -d, --debug               log additional debug info
  -e, --debugserver         log ejb debug info
  -p, --port <port>         serve app on specifict port
  -b, --build               save the generated presentation to the path specified in `exportHTMLPath`
  -l, --location <location> save the generated presentation to the path specified. This is the strongest setting.
  -y, --yes                 answer yes to every prompt
  -s, --serve               serve app on a random port
  -r, --refresh             do not cache generated template
  -c, --config <location>   config json file to override default values
  -o, --open <location>     source of the starter markdown file
  -h, --help                output usage information

You must specify the --open flag to load a markdown file for generation. You can find examples in the examples folder.

You may set the --build flag to keep the generated files. In case you do not specify a --port, and the --serve flag is not set either, then a build bundle is created even if the --build flag is not set.

Under the hood, it currently uses the same engine as VSCode-Reveal.

For contributions getting started see dev docs.

Features

Markdown

Create reveal.js presentation directly from markdown file, open or create a new file in markdown and use default slide separator to see slide counter change in the status bar and title appear in the sidebar.

Since Reveal.js use marked to parse the markdown string you can use this in your document:

  • GitHub flavored markdown.
  • GFM tables

If you need a sample file you can get it here: https://raw.githubusercontent.com/budavariam/revealjs-cli/master/examples/sample/sample.md

Theme

reveal.js comes with a few themes built in:

  • Black (default)
  • White
  • League
  • Sky
  • Beige
  • Simple
  • Serif
  • Blood
  • Night
  • Moon
  • Solarized

You can set it using revealjs.theme parameter in Vs code config or in the document itself using front matter.

If you want a custom theme you can do it! Just add custom style to a CSS file in the same folder that your markdown.

example: if your file name is my-theme.css just add this in the front matter header :

---
customTheme : "my-theme"
---

Note that you can use both theme and custom theme at the same time. Your custom theme will be loaded after to override default reveal.js theme.

Highlight Theme

You can use code block in your markdown that will be highlighted by highlight.js. So you can configure the coloration theme by setting revealjs.highlightTheme parameter of VS Code, or set it using front matter.

---
highlightTheme : "other theme"
---

Get the theme list here https://highlightjs.org/

Reveal.js Options

You can customize many setting on for your reveal.js presentation.

NameDescriptionDefault
revealjs.notesSeparatorRevealjs markdown note delimiternote:
revealjs.themeRevealjs Theme (black, white, league, beige, sky, night, serif, simple, solarizedblack
revealjs.highlightThemeHighlight ThemeZenburn
revealjs.controlsDisplay controls in the bottom right cornertrue
revealjs.progressDisplay a presentation progress bartrue
revealjs.slideNumberDisplay the page number of the current slide
revealjs.historyPush each slide change to the browser history
revealjs.keyboardEnable keyboard shortcuts for navigationtrue
revealjs.overviewEnable the slide overview modetrue
revealjs.centerVertical centering of slidestrue
revealjs.touchEnables touch navigation on devices with touch inputtrue
revealjs.loopLoop the presentation
revealjs.rtlChange the presentation direction to be RTL
revealjs.shuffleRandomizes the order of slides each time the presentation loads
revealjs.fragmentsTurns fragments on and off globallytrue
revealjs.embeddedFlags if the presentation is running in an embedded mode, i.e. contained within a limited portion of the screen
revealjs.helpFlags if we should show a help overlay when the questionmark key is pressedtrue
revealjs.showNotesFlags if speaker notes should be visible to all viewers
revealjs.autoSlideNumber of milliseconds between automatically proceeding to the next slide, disabled when set to 0, this value can be overwritten by using a data-autoslide attribute on your slides
revealjs.autoSlideMethodThe direction in which the slides will move whilst autoslide is activatedReveal.navigateNext
revealjs.autoSlideStoppableStop auto-sliding after user inputtrue
revealjs.mouseWheelEnable slide navigation via mouse wheel
revealjs.hideAddressBarHides the address bar on mobile devicestrue
revealjs.previewLinksOpens links in an iframe preview overlay
revealjs.transitionTransition style (none/fade/slide/convex/concave/zoom)default
revealjs.transitionSpeedTransition speed (default/fast/slow)default
revealjs.backgroundTransitionTransition style for full page slide backgrounds (none/fade/slide/convex/concave/zoom)default
revealjs.viewDistanceNumber of slides away from the current that are visible3
revealjs.parallaxBackgroundImageParallax background image
revealjs.parallaxBackgroundSizeParallax background size (CSS syntax, e.g. 2100px 900px)
revealjs.parallaxBackgroundHorizontalNumber of pixels to move the parallax background per slide
revealjs.parallaxBackgroundVerticalNumber of pixels to move the parallax background per slide

YAML Front Matter

You can change settings directly in your markdown file using front matter style. You can change all extention settings like this :

---
theme : "white"
transition: "zoom"
---

Note do not add revealjs. prefix before setting name.

Plugins

Disable slideout menu

---
enableMenu: false
---

Disable chalkboard

---
enableChalkboard: false
---

Disable title footer

---
enableTitleFooter: false
---

Disable zoom

---
enableZoom: false
---

Disable search

---
enableSearch: false
---

FAQ

Note : The first time, Windows will ask you about the firewall. If you open the port for the application, you can see your presentation remotely.

Known Issues

Please add issues on Github.