enable reading template variable from JS files
This commit is contained in:
parent
e7eb6932e2
commit
e90b28cd24
4 changed files with 9 additions and 5 deletions
|
@ -24,8 +24,8 @@
|
|||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $options }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
||||
{{ $options := (dict "targetPath" (printf `minima.%d.js` $hash) "minify" true) }}
|
||||
{{ $js := resources.Get "js/main.js" | js.Build $options }}
|
||||
{{ $options = (dict "targetPath" (printf `minima.%d.js` $hash) "minify" true) }}
|
||||
{{ $js := resources.Get "js/main.js" | js.Build $options | resources.ExecuteAsTemplate (printf `minima.%d.js` $hash) . }}
|
||||
<script defer type="text/javascript" src="{{ $js.RelPermalink }}"></script>
|
||||
</head>
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue