From da505aa0f58c8c6a9b7a34ee3a04324e2f618214 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Wed, 24 Jun 2020 09:55:20 -0700 Subject: [PATCH] Change how prismjs is loaded. - Load minified code (3kB vs 30kB) - Add prism autoloader so that we get highlighting for languages we use. - Hardcode exact prism version. Perhaps this is controversial, but it saves a redirect for each request, shaving off 30ms on a fast connection. --- layouts/_default/single.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4857f1c..e1ee0a5 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -32,5 +32,8 @@ {{ end }} {{ define "scripts" }} - + {{/* Hardcode a specific prismjs version to avoid a redirect on every page load. */}} + + {{ end }}