dploeger / jekyll-revealjs

A Jekyll-based framework for creating presentations based on Reveal.js and markdown.
http://dploeger.github.io/jekyll-revealjs/
BSD 2-Clause "Simplified" License
126 stars 60 forks source link

Multiple presentations per repository #28

Open infotexture opened 5 years ago

infotexture commented 5 years ago

Single talk per repo

The way this project is currently set up, it seems to assume there will be a single presentation per repository (or branch).

While branches can be used to store multiple talks in the same repo, this requires switching branches and re-running the build/serve commands to switch between talks. This works fine with a local development environment, but breaks down when talks are published via GitHub Pages, which depends on a single branch setting (master, gh-pages or a docs/ folder on the master branch).

How to manage multiple talks?

Users can work around this limitation by cloning or forking the repo for each new presentation, but this seems like overkill when everything except the Markdown content of the presentation would be identical.

The fix for #18 in #27 pulls description and author from the site configuration (rather than hard-coding them in the layout), but this still means only a single value can be specified for each β€” it just changes the place where this change needs to be made.

The current approach also makes it difficult to integrate this code into other Jekyll sites that already have _posts and pages that are not Reveal.js presentations.

Jekyll collections to the rescue?

I'm wondering whether Jekyll's collections feature could be used to overcome this limitation, so each presentation would be an item in a collection, rather than a post. πŸ€”

This would enable not only multiple presentations per repository, but also the use of subfolders to structure the collection, for example:

_talks/
β”œβ”€β”€ conference1/
β”‚Β Β  └── talk1.md
β”‚Β Β  └── talk2.md
β”œβ”€β”€ conference2/
β”‚Β Β  └── talk3.md
β”‚Β Β  └── talk4.md
└── etc/

Jekyll's collection permalinks could then be used to create a dedicated URL for each presentation, like https://example.com/talks/conference1/talk1/.

I'm not exactly sure how to go about thisβ€Šβ€”β€Šand realize it may be out of scope for the original use caseβ€Šβ€”β€Šbut I'm curious to hear whether this would be useful to others and if anyone has suggestions for how to implement it?

blueardour commented 4 years ago

I also prefer the feature however have little knowledge how to implement it.

I guess by changing the iteration folder might help (in _layerout/reveal.html):

"

{% for post in site.posts reversed %} " to

"

{% for post in site.categories.slides reversed %}

Githubissues.
  • Githubissues is a development platform for aggregating issues.