evilz / vscode-reveal

Revealjs vsCode extension
https://marketplace.visualstudio.com/items?itemName=evilz.vscode-reveal
MIT License
451 stars 145 forks source link

Offline support #1252

Open bwiberg opened 1 year ago

bwiberg commented 1 year ago

Hi,

First of all, thank you for a great extension.

I work in an offline environment where I do not have internet access. This causes the extension to fail since it relies on the CDN-hosted Font Awesome. I commented out the following lines: https://github.com/evilz/vscode-reveal/blob/3fa8966bafe0dfa9e6d4e5a6a1e0e750ebd52164/views/head.ejs#L17 https://github.com/evilz/vscode-reveal/blob/29b6c41ea4358c9c7928db22afb48b5db2a4d849/index.html#L22

And that made the extension work.

Looking through the source code it seems like the MathJax library is loaded from a CDN as well: https://github.com/evilz/vscode-reveal/blob/29b6c41ea4358c9c7928db22afb48b5db2a4d849/index.html#L250

Is this something you're willing to consider adding support for? Two alternatives I can think of are:

  1. Bundling the font-awesome.min.css (and MathJax) files (like you already do with the Remark Javascript code)
  2. Adding an "offline" option to the plugin, causing external resources to be skipped
evilz commented 1 year ago

Yes sure ! PR could be nice

bwiberg commented 1 year ago

Which of the two alternatives would you prefer? Bundling everything or adding an offline option?

evilz commented 1 year ago

Bundle is nice but is we want to disable some feature. it's not as easy. So just offline lib to start is enaught I guest