Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

FEATURE: Remove references to third-party CDNs from site head #56

Closed
VincentTam opened this issue Aug 15, 2019 · 1 comment · Fixed by #66
Closed

FEATURE: Remove references to third-party CDNs from site head #56

VincentTam opened this issue Aug 15, 2019 · 1 comment · Fixed by #66

Comments

@VincentTam
Copy link
Collaborator

VincentTam commented Aug 15, 2019

Feature Request

Is your feature request related to a problem?

😥 Our project has several references to external scripts.

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/skel/3.0.1/skel.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>

⚠️ This practice is not recommended by @onedrawingperday in the updated Theme Submission Guidelines in gohugoio/hugoThemes#668.

🖊️ I avoid putting links here so that our project won't be linked there.

Solution

Download the minified scripts and store the local copies under assets/static.

Additional Context

The aforementioned issue in https://github.com/gohugoio/hugoThemes.

@VincentTam VincentTam changed the title FEATURE: Remove third-party CDN from asset paths. FEATURE: Remove references to third-party CDNs from site head Aug 15, 2019
@pacollins
Copy link
Owner

Additional solution might be include a useCDN param in the config.toml so that users can opt-in to the CDN, but also include assets.

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

Successfully merging a pull request may close this issue.

2 participants