From b010379741c64c26dba13d6dd85664340045ef89 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Tue, 3 Sep 2019 16:10:18 +0100 Subject: [PATCH] feat: load js from cdn using Netlify's reverse proxy - https://www.netlify.com/docs/redirects/ --- source/_redirects | 5 ++++- themes/typing/layout/_partial/head.ejs | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/_redirects b/source/_redirects index 586b1dd..2b4bc47 100644 --- a/source/_redirects +++ b/source/_redirects @@ -1,4 +1,7 @@ # Temporarily set the homepage to /blog / /blog/ 302 # Redirect post to /blog/ -/:year/:month/:date/:slug /blog/:year/:month/:date/:slug/ 301 \ No newline at end of file +/:year/:month/:date/:slug /blog/:year/:month/:date/:slug/ 301 + +# Reverse proxy to cdn +/extjs/* https://cdnjs.cloudflare.com/ajax/libs/:splat 200 diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index 022bb8f..2f752ad 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -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') %>