Quellcode durchsuchen

Add generated Webpack Assets file

This file is generated by Webpack and writes the names of our hashed assets

Signed-off-by: budparr <budparr@gmail.com>
hashassets
budparr vor 6 Jahren
Ursprung
Commit
d6c6367502
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
2 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen
  1. 6
    0
      data/webpack_assets.json
  2. 3
    5
      layouts/partials/site-scripts.html

+ 6
- 0
data/webpack_assets.json Datei anzeigen

@@ -0,0 +1,6 @@
{
"app": {
"js": "js/app.3fc0f988d21662902933.js",
"css": "css/app.ab4b67a3ea25990fa8279f3b7ef08b61.css"
}
}

+ 3
- 5
layouts/partials/site-scripts.html Datei anzeigen

@@ -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 }}

Laden…
Abbrechen
Speichern