From d6c636750273e9ed9bce913dd79e31fa0132324c Mon Sep 17 00:00:00 2001 From: budparr Date: Tue, 10 Apr 2018 18:26:18 -0400 Subject: [PATCH] Add generated Webpack Assets file This file is generated by Webpack and writes the names of our hashed assets Signed-off-by: budparr --- data/webpack_assets.json | 6 ++++++ layouts/partials/site-scripts.html | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 data/webpack_assets.json diff --git a/data/webpack_assets.json b/data/webpack_assets.json new file mode 100644 index 0000000..93cb190 --- /dev/null +++ b/data/webpack_assets.json @@ -0,0 +1,6 @@ +{ + "app": { + "js": "js/app.3fc0f988d21662902933.js", + "css": "css/app.ab4b67a3ea25990fa8279f3b7ef08b61.css" + } +} \ No newline at end of file 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 . }} - - {{ end }} +{{ $script := .Site.Data.webpack_assets.app }} +{{ with $script.js }} + {{ end }}