/revealjs-docker

Simplified Reveal.js server

Primary LanguageHTML

Reveal.js Docker

Simplified Reveal.js server

  • All you need is Markdown slide files
    index.html is not required
  • YAML formatted config

Getting Started

Run uphy/reveal.js container

$ docker run --name reveal.js -d \
    -v "$(pwd)/data:/reveal.js/data" \
    -p "8000:8000" \
    -p "35729:35729" \
    ghcr.io/uphy/reveal.js:5.1.0

Open http://localhost:8000 with your browser

Presentation files are stored on data directory.
Edit them and make your own presentation.

Config File

You can change the presentation theme, title, and many reveal.js configs
Config file(config.yml) is located on your data directory.

Generate demo data

Generate demo data.

$ docker run --name reveal.js -d \
    -v "$(pwd)/data:/reveal.js/data" \
    -p "8000:8000" \
    -p "35729:35729" \
    ghcr.io/uphy/reveal.js:5.1.0 init demo

Start server

$ docker run --name reveal.js -d \
    -v "$(pwd)/data:/reveal.js/data" \
    -p "8000:8000" \
    -p "35729:35729" \
    ghcr.io/uphy/reveal.js:5.1.0

Build presentation as static html files.

$ docker run --rm \
    -v "$(pwd)/data:/reveal.js/data" \
    -v "$(pwd)/docs:/reveal.js/build" \
    ghcr.io/uphy/reveal.js:5.1.0 build

Files are stored in docs directory.
This is useful for hosting the presentation on GitHub Pages.

docker-compose

Create docker-compose.yml.

version: "2"

services:
  revealjs:
    image: ghcr.io/uphy/reveal.js:5.1.0
    ports:
      - "8000:8000"
      - "35729:35729"
    volumes:
      - "./data:/reveal.js/data"
      - "./docs:/reveal.js/build"

Generate demo data.

$ docker-compose run --rm revealjs init demo

Start server.

$ docker-compose up -d

Build presentation as static html files.

$ docker-compose run --rm revealjs build

Advanced

If you want to edit index.html directly, edit index.html.tmpl located on your data directory.