https://github.com/uphy/revealjs-docker
Simplified Reveal.js server
https://github.com/uphy/revealjs-docker
Last synced: 4 months ago
JSON representation
Simplified Reveal.js server
- Host: GitHub
- URL: https://github.com/uphy/revealjs-docker
- Owner: uphy
- Created: 2018-10-01T11:55:53.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T03:01:06.000Z (over 4 years ago)
- Last Synced: 2023-03-24T11:50:06.167Z (over 3 years ago)
- Language: HTML
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```console
$ 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](https://github.com/hakimel/reveal.js/#configuration)
Config file(`config.yml`) is located on your `data` directory.
## Generate demo data
Generate demo data.
```console
$ 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
```console
$ 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.
```console
$ 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.
```yaml
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.
```console
$ docker-compose run --rm revealjs init demo
```
Start server.
```console
$ docker-compose up -d
```
Build presentation as static html files.
```console
$ docker-compose run --rm revealjs build
```
## Advanced
If you want to edit `index.html` directly, edit `index.html.tmpl` located on your `data` directory.