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

Need help replacing remote script in index.html with a local script #35

Open
UniqueActive opened this issue Sep 13, 2019 · 3 comments
Open

Comments

@UniqueActive
Copy link

Hello!

I very much enjoy the Even theme for Zola, but I recently found that by default, it uses jsdelivr and cloudflare to deliver some of its needed scripts. For user privacy reasons, I would like to change this, so that it instead serves the script locally.

The line especially relevant for me (since my site does not use the maths stuff) is this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/slideout/1.0.1/slideout.min.js"></script>

Since I am not familiar with web languages, could you kindly point me to the right syntax to use if I want to serve this file locally?

Thank you in advance!


P.S. I would also be very very happy if you could modify the theme to behave in this way by default, since this is an unnecessary violation of users' privacy.

@Keats
Copy link
Collaborator

Keats commented Sep 15, 2019

You can do a PR to add it to the theme directly if you want

@UniqueActive
Copy link
Author

UniqueActive commented Sep 15, 2019 via email

@UniqueActive
Copy link
Author

Alright, I managed to change it for my site by fetching the script, putting it in the static folder and changing that line to say

<script type="text/javascript" src="{{ get_url(path="slideout.min.js", trailing_slash=false) }}" ></script>

Now I just have to figure out how to make a PR and whether I can simply include the slideout.min.js script (didn't look into licensing stuff yet, advice appreciated).

I will also see if I can potentially replace all current JS in even with just CSS and make another PR or a fork if/when I get to that point :)

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