Skip to content

ryanj/gist-reveal

Repository files navigation

Gist-Reveal

Gist-powered Revealjs presentations

Gist-Reveal.it is an open source slideshow templating service that makes it possible to create, edit, present, and share Reveal.js slides using github's gist service as a datastore.

gist-reveal.it/YOUR_GIST_ID

Store any Revealjs-compatible HTML or Markdown content in a gist, then append your resulting gist id to the end of any gist-reveal site url to view the resulting presentation:

http://gist-reveal.it/GIST_ID_CONTAINING_REVEALJS_SLIDE_CONTENT

Example:

http://gist-reveal.it/af84d40e58c5c2a908dd

Use bitly or another url shortener to make these long urls easier to share, and to make enagement rates easier to count.

gist-reveal.it/bit.ly/SHORTNAME

Creating a bit.ly shortname for your longer gist-reveal/gist_id deck urls will also make your presentations available at an alternate presentation path:

http://gist-reveal.it/bit.ly/SHORTNAME

Example:

http://gist-reveal.it/bit.ly/k8s-workshops

Much nicer! Make sure to continue sending traffic to the shorter bit.ly/shortname url for metrics collection purposes.

Broadcasting Slide Transitions

Administrators can configure the application's CLIENT_ID and CLIENT_SECRET to enable broadcasting of slide transitions using SocketIO.

Presenters can visit /login to configure their browser as a presentation device:

https://gist-reveal.it/login

WARNING: You can only broadcast slide transitions for presentations where you are the gist owner. Mismatched presenter actions are ignored. If needed, fork the slide deck and present using your new gist_id!

When you are finished presenting, reset to "Listener" mode by visiting /logout:

https://gist-reveal.it/logout

Gist-powered Slideshow Themes

Available CSS themes include the default list of Revealjs themes, but can be extended by storing a new theme in a gist:

Conference organizers can host their own modified gist-reveal templating service (with its own default theme), to provide a consistent look for all presentations at an event.

Running Gist-Reveal.it

Run your own Gist-powered RevealJS slideshow service with gist-reveal

Application Config

The following environment variables can be used to autoconfigure the application:

Variable Name Contents Default Value
PORT The server port number 8080
DEFAULT_GIST The default gist id content for the site af84d40e58c5c2a908dd
REVEAL_THEME The site's default theme. Can be a locally bundled theme name, or a remote gist_id 450836bbaebcf4c4ae08b331343a7886
GH_API_TOKEN GitHub API token unset
CLIENT_ID GitHub OAuth App Client ID unset
CLIENT_SECRET GitHub OAuth App Client Secret unset
PRIVATE_KEY TLS private key provided as Env var or file: private.key unset
PUBLIC_CRT Public TLS certificate as Env var or as file: public.crt unset
GA_TRACKER Google Analytics tracker token unset
GIST_THEMES Allow reveal.js CSS themes to be installed dynamically "url/?theme=gist_id". Disable this feature by setting this config to the string "false". true
SANITIZE Sanitize gist input. Strip script tags and iframes false

See index.js for more information about the site's configuration options.

Local Development

The simplest way to get started with this project, is to clone a copy of the source from github (git clone http://github.com/ryanj/gist-reveal && cd gist-reveal), then run the app locally with npm install followed by npm start.

Optionally generate a localhost certificate for testing https/wss connections:

openssl req -x509 -out public.crt -keyout private.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=localhost' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

Podman or Docker

Run the container image locally on port 8080:

docker run --rm -p 8080:8080 ryanj/gist-reveal

Environment variables can be passed into the container to configure the default theme, or to change the default slideshow content:

docker run --rm -p 8080:8080 -e "DEFAULT_GIST=YOUR_DEFAULT_GIST_ID" ryanj/gist-reveal

Kubernetes

Create a kubernetes pod and service, both named gist-reveal:

kubectl run gist-reveal --image=ryanj/gist-reveal --expose --port=8080 \
--env="DEFAULT_GIST=YOUR_DEFAULT_GIST_ID" \
--env="GH_API_TOKEN=YOUR_GH_API_TOKEN" \
--env="CLIENT_SECRET=YOUR_GH_CLIENT_SECRET" \
--env="CLIENT_ID=YOUR_CLIENT_ID_VALUE"

License

gist-reveal.it was created at the first DockerCon Hackathon by @ryanj and @fkautz.

Reveal.js is MIT licensed Copyright (C) 2014 Hakim El Hattab, http://hakim.se