Skip to content

View markdown files as a presentation in Reveal.js with CLI

Notifications You must be signed in to change notification settings

maasdorp/reveal-md

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reveal.js x Markdown (Showdown.js) editor, CLI and viewer.

Features

How to create Reveal-md

  • Global scripting <script></script> and styling <style></style> is also supported in slides marked with
// global
content (CSS, Pug, HTML or extended Markdown)
  • The slides marked with // global or // hidden will be hidden.

HTML is also supported.

<small>Small character</small>

// slide

<small>Small character</small>

Furthermore, you can reference other online CSS urls via

  • // css=<URL>

Installation of CLI editor

npm i https://github.com/patarapolw/reveal-md.git

Or,

npm i -g https://github.com/patarapolw/reveal-md.git

It might possible to use Yarn as well, but NPM is confirmed to work, especially for npm i ./reveal-md (which will create symlink instead of copy files.)

git submodule add https://github.com/patarapolw/reveal-md.git
cd reveal-md && npm i
cd ..
npm i ./reveal-md
# This will create symlink, but `yarn add ./reveal-md` will copy to `node_modules`

Usage

reveal-md [options] <fileOrDir>

Read file or directory or in reveal-md

Positionals:
  fileOrDir  Path to the file or directory to read

Options:
  --version   Show version number                                      [boolean]
  --edit, -e  Edit the file in editor                                  [boolean]
  --help      Show help                                                [boolean]

Additional features of CLI editor

  • // css=<FILE_PATH> also works

To add external JavaScript, you will have to edit

Save as HTML (and associated assets folder)

This is best done by downloading complete web page, in associated web browser.

Using web crawlers, like https://github.com/website-scraper/node-website-scraper won't work, because some JavaScript in Reveal.js is dynamically injected.

Online viewer

You can do it at https://patarapolw.github.io/reveal-md/reveal/?q=<YOUR_URL_HERE>

Create your own version

  • Clone this project
  • Build /editor/ and/or /reveal/, and the following environmental variables can be set if needed.
    • BASE_URL= -- needed for GitHub Pages
    • NO_EDITOR= -- if you don't want to build the editor. Build the /reveal/index.html only.

Duplicated projects

Contributions

About

View markdown files as a presentation in Reveal.js with CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • TypeScript 50.7%
  • Vue 30.6%
  • JavaScript 15.1%
  • HTML 3.2%
  • CSS 0.4%