From 6a795585121ba0c090c77529d1b4b1e31227f366 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Tue, 3 Sep 2019 17:21:29 +0100 Subject: [PATCH] feat(js): reverse proxy /libs/ to cdn --- source/_redirects | 2 +- themes/typing/layout/_partial/after-footer.ejs | 2 +- themes/typing/layout/_partial/head.ejs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_redirects b/source/_redirects index 8c52ee0..54d42e2 100644 --- a/source/_redirects +++ b/source/_redirects @@ -2,4 +2,4 @@ / /blog/ 302 # Reverse proxy to cdn -/extjs/* https://cdnjs.cloudflare.com/ajax/libs/:splat 200 +/libs/* https://cdn.statically.io/libs/:splat 200 diff --git a/themes/typing/layout/_partial/after-footer.ejs b/themes/typing/layout/_partial/after-footer.ejs index 3876fed..6b7e69a 100644 --- a/themes/typing/layout/_partial/after-footer.ejs +++ b/themes/typing/layout/_partial/after-footer.ejs @@ -1,5 +1,5 @@ <% if (is_post()) { %> -<%- addJs({ src: 'https://cdn.statically.io/libs/clipboard.js/2.0.4/clipboard.min.js', 'data-sri-fallback': '/js/clipboard.min.js', integrity: 'sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu', crossorigin: 'anonymous', defer: true}) %> +<%- addJs({ src: '/libs/clipboard.js/2.0.4/clipboard.min.js', 'data-sri-fallback': '/js/clipboard.min.js', integrity: 'sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu', crossorigin: 'anonymous', defer: true}) %> <% } %> <%/* javascript of Typing theme */%> diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index 022bb8f..bce3f4e 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -50,6 +50,6 @@ <%- addCss('/css/typing.css') %> <% 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' }) %> + <%- addCss({ href: '/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' }) %> <% } %>