Open jorgelaranjo opened 6 years ago
In some locations, for some reason [network, device, etc] cloudflare may not be resolved thus no script /css gets downloads and thus the content does not render. My suggestion would be to embed the
css
andjs
on thehtml
output itself. I did a quick test on one of those locations,wget -i links.txt
whichlinks.txt
containing all those Cloudflare links and then edit the outputhtml
to link to local files. It all works. But having several local files is a bit of a mess thus I'd prob fork to get those embed.You ok with that fork, as I assume you'd not like to merge that change?
The other way would be to allow for *kwargs
and change the template accordingly to allow for CDNJS
or to store CDNJS
locally and either link to those or embed those into the output html
file.
Also since we are at it I'd change the template to allow for the title
to be changed through arguments
My 2p :)
Yes, the dependency on the external CDN is unfortunate, but I don't really want to complicate this simple modules signature with this kind of detail which most users will not be willing/able to manage. I would recommend a fork if this is really necessary for you.
A much more powerful approach is shown here however: https://github.com/PierreMarion23/ipypivot :)
@nicolaskruchten My solution to make it simpler is generate the HTML with CDN links then replace the whole header with inline code from those files which are kept locally.
That's achieved using a simple script which calls sed
In some locations, for some reason [network, device, etc] cloudflare may not be resolved thus no script /css gets downloads and thus the content does not render. My suggestion would be to embed the
css
andjs
on thehtml
output itself. I did a quick test on one of those locations,wget -i links.txt
whichlinks.txt
containing all those Cloudflare links and then edit the outputhtml
to link to local files. It all works. But having several local files is a bit of a mess thus I'd prob fork to get those embed.You ok with that fork, as I assume you'd not like to merge that change?