Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
-
Install Node.js (4.0.0 or later)
-
Clone the reveal.js repository
[user@host path]$ git clone https://github.com/rht-labs/enablement-docs
-
Navigate to the slides folder
[user@host path]$ cd slides -
Install
npmdependencies:[user@host path]$ npm install
-
Serve the presentation and monitor source files for changes:
[user@host path]$ npm start
-
Open http://localhost:8000 to view your presentation. You can change the port by using:
[user@host path]$ npm start -- --port=8001
-
css/ Core styles without which the project does not function
-
js/ Like above but for JavaScript
-
plugin/ Components that have been developed as extensions to reveal.js
-
lib/ All other third party assets (JavaScript, CSS, fonts)
-
Run the slides locally as described above.
-
Open the slides in Chrome or Chromium.
-
Add
?print-pdfto the URL. For example:http://localhost:8000/chapter17.html?print-pdf#/ -
use Headless Chrome to download the pdf by using
for i in `seq 1 9`; do $GOOGLE_CRHOME_PATH --headless --disable-gpu --print-to-pdf=./chapter0$i.pdf http://localhost:8000/chapter0$i.html\?print-pdf\#/ done for i in `seq 10 17`; do $GOOGLE_CHROME_PATH --headless --disable-gpu --print-to-pdf=./chapter$i.pdf http://localhost:8000/chapter$i.html\?print-pdf\#/ done
if you are using macOS the Google Chrome path is in
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome