tomeshnet / p2p-internet-workshop

Building the Peer-to-Peer Internet workshop series
https://tomeshnet.github.io/p2p-internet-workshop/
Creative Commons Attribution Share Alike 4.0 International
99 stars 17 forks source link

Add Remark dependencies to install-dependencies.sh #81

Closed Shrinks99 closed 5 years ago

Shrinks99 commented 5 years ago
benhylau commented 5 years ago

No we don't need a web server, as long as you use the flag --chrome-arg=--allow-file-access-from-files like such:

decktape remark index.html out.pdf --chrome-arg=--allow-file-access-from-files

I was able to PDF my personal remark slides like this. But it fails with the following on your branch, perhaps because of the relative paths to remark.min.js in the root directory:

❯❯❯ decktape remark module-1.html out.pdf --chrome-arg=--allow-file-access-from-files
Loading page file:///<<PATH_TO>/p2p-internet-workshop/module-1/module-1.html ...

Page error: Error
    at XMLHttpRequest.s.onload (file:///<PATH_TO>/p2p-internet-workshop/remark.min.js:17:19540)
Loading page finished with status: 0
Remark JS plugin activated
Printing slide #0       (  1/ ?) ...
Printed 1 slides

Perhaps it is due to the relative paths you have. All the remark files should be contained in the presentation directory, even though that could duplicate the remark files I expect them to be reasonably sized... that should solve the problem. It would also avoid how your branch currently has all these remark files spilled all over the root directory.

Shrinks99 commented 5 years ago

Closed in 94ac958!