feat: load js from cdn using Netlify's reverse proxy

- https://www.netlify.com/docs/redirects/
This commit is contained in:
curben 2019-09-03 16:10:18 +01:00
parent 0f2b236652
commit b010379741
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
2 changed files with 6 additions and 1 deletions

View File

@ -2,3 +2,6 @@
/ /blog/ 302
# Redirect post to /blog/
/:year/:month/:date/:slug /blog/:year/:month/:date/:slug/ 301
# Reverse proxy to cdn
/extjs/* https://cdnjs.cloudflare.com/ajax/libs/:splat 200

View File

@ -52,4 +52,6 @@
<% if (theme.icons) { %>
<%- addCss({ href: 'https://cdn.statically.io/libs/fork-awesome/1.1.7/css/fork-awesome.min.css', 'data-sri-fallback': '/forkawesome/css/fork-awesome.min.css', integrity: 'sha384-mByhW6NjnxyShh67P9+fepUvYSd7Uz/qV6e2u4kA2Fi4ZkjXxIP2mRkyK9dwK24W', crossorigin: 'anonymous' }) %>
<% } %>
<%- addJs('/extjs/jquery/3.4.1/jquery.slim.js') %>
</head>