Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare 404/not resolving #43

Open
jorgelaranjo opened this issue Oct 2, 2018 · 3 comments
Open

Cloudflare 404/not resolving #43

jorgelaranjo opened this issue Oct 2, 2018 · 3 comments

Comments

@jorgelaranjo
Copy link

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 and js on the html output itself.
I did a quick test on one of those locations, wget -i links.txt which links.txt containing all those Cloudflare links and then edit the output html 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?

@jorgelaranjo
Copy link
Author

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 and js on the html output itself.
I did a quick test on one of those locations, wget -i links.txt which links.txt containing all those Cloudflare links and then edit the output html 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 :)

@nicolaskruchten
Copy link
Owner

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 :)

@jorgelaranjo
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants