From d6c636750273e9ed9bce913dd79e31fa0132324c Mon Sep 17 00:00:00 2001
From: budparr <budparr@gmail.com>
Date: Tue, 10 Apr 2018 22:26:18 +0000
Subject: [PATCH] Add generated Webpack Assets file
---
layouts/partials/site-scripts.html | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/layouts/partials/site-scripts.html b/layouts/partials/site-scripts.html
index 7508f27..590bdd8 100644
--- a/layouts/partials/site-scripts.html
+++ b/layouts/partials/site-scripts.html
@@ -1,6 +1,4 @@
-{{ $css_path := $.Param "dev.js_path" | default "themes/gohugo-theme-ananke/static/dist/js" }}
-{{ with $css_path }}
- {{ range readDir . }}
- <link href='/dist/js/{{ .Name }}' rel='stylesheet' type="text/css" data-turbolinks-track="reload" />
- {{ end }}
+{{ $script := .Site.Data.webpack_assets.app }}
+{{ with $script.js }}
+ <script src="{{ printf "%s%s" "/dist/" . }}"></script>
{{ end }}
--
Gitblit v1.10.0