jackweirdy
jackweirdy

Reputation: 5840

Reveal.js server - serve many presentations

I'm using markdown and reveal.js to create presentations, and want to start using node.js to serve them from my website.

I've read the docs for reveal.js and it seems like it's easy to do for one presentation, but trickier for several. For example, I'd like

http://mysite/presentations/rabbits

and

http://mysite/presentations/deer

to run on the same instance of node, but each point to a different presetation. Is this possible natively (or with existing plugins), or will I have to hack something together myself?

Upvotes: 2

Views: 2905

Answers (2)

Joris van Zundert
Joris van Zundert

Reputation: 31

I know, just three years late. But in case anyone might end up here to look for an answer, there's a working recipe over here: https://web.archive.org/web/20151223044405/https://medium.com/@KienanKB/serving-multiple-reveal-js-presentations-b1a5c086e959 (archived link to the now removed article).

Note: Reveal.js changed the part defining what files it watches:

html: {
  files: [ ‘index.html’ ]
}

Instead of ‘index.html’ it now reads ‘*.html’. 

The recipe still works fine though.

Upvotes: 3

robi-y
robi-y

Reputation: 1717

As long as you're using basic features you don't need node.js at all - just drop the reveal.js distribution in every presentation folder where it is served statically.

Another option is hosting on github pages, I've checked it now for this scenario and it seems to be served right.

You might also want to raise this issue at the project page https://github.com/hakimel/reveal.js/issues

Upvotes: 0

Related Questions