From ad19fa779c6532df51425f951f0784be70c3bb95 Mon Sep 17 00:00:00 2001 From: Jake Date: Sun, 11 Mar 2018 19:38:52 +0000 Subject: [PATCH] Extract mermaid to seperate JS file Means it doesnt break speedpack, for some reason --- Makefile | 1 + layouts/_default/baseof.html | 2 ++ static/src/js/index.js | 2 -- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7d4c1e4..93c44a3 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ build: install $(NODE_BIN)/node-sass $(STATIC_SRC)/scss/style.scss $(STATIC_BUILD)/css/style.css --source-map-embed cp -r $(BASEDIR)/node_modules/lightgallery/dist/fonts $(STATIC_BUILD) cp -r $(STATIC_SRC)/img $(STATIC_BUILD)/img + cp node_modules/mermaid/dist/mermaid.min.js $(STATIC_BUILD)/js/mermaid.js @hugo -vDEF --stepAnalysis --gc mkdir -p $(OUTPUT_DIR)/.well-known/ cp $(BASEDIR)/static/keybase.txt $(OUTPUT_DIR)/keybase.txt diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a599592..be138f2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -20,6 +20,8 @@ {{ block "main" . }}{{ end }} {{ partial "footer.html" . }} + + diff --git a/static/src/js/index.js b/static/src/js/index.js index b06e01c..fe04a7b 100644 --- a/static/src/js/index.js +++ b/static/src/js/index.js @@ -10,8 +10,6 @@ require('lg-thumbnail/dist/lg-thumbnail'); require('plyr').setup(); var Clipboard = require('clipboard'); -var mermaid = require('mermaid'); - $('.image').each(function () { // setup div-image hybrids var ele = $(this);