forked from mirrors/hugo-theme-terminal
Webpack -> Hugo Pipes
This commit is contained in:
@ -12,8 +12,13 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ "assets/main.js" | absURL }}"></script>
|
||||
<script src="{{ "assets/prism.js" | absURL }}"></script>
|
||||
{{ $js := resources.Get "js/main.js" | js.Build }}
|
||||
{{ $js := resources.Get "js/prism.js" | js.Build }}
|
||||
{{ $opts := dict "noComments" true "minified" true "compact" true }}
|
||||
{{ $menu := resources.Get "js/menu.js" | js.Build | babel $opts }}
|
||||
{{ $prism := resources.Get "js/prism.js" | js.Build | babel $opts }}
|
||||
<script src="{{ $menu.Permalink }}"></script>
|
||||
<script src="{{ $prism.Permalink }}"></script>
|
||||
|
||||
<!-- Extended footer section-->
|
||||
{{ partial "extended_footer.html" . }}
|
||||
|
@ -8,11 +8,15 @@
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
|
||||
<!-- Theme CSS -->
|
||||
<link rel="stylesheet" href="{{ "assets/style.css" | absURL }}">
|
||||
{{ if (isset .Params "color") }}
|
||||
<link rel="stylesheet" href="{{ (printf "assets/%s.css" .Params.color) | absURL }}">
|
||||
{{ else if (ne $.Site.Params.ThemeColor "orange") }}
|
||||
<link rel="stylesheet" href="{{ (printf "assets/%s.css" $.Site.Params.ThemeColor) | absURL }}">
|
||||
{{ $css := resources.Get "css/style.css" }}
|
||||
{{ $opts := dict "inlineImports" true }}
|
||||
{{ $style := $css | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
|
||||
{{ if (or (isset .Params "color") (ne $.Site.Params.ThemeColor "orange")) }}
|
||||
{{ $colorCss := resources.Get (printf "css/color/%s.css" (or .Params.color $.Site.Params.ThemeColor)) }}
|
||||
{{ $color := $colorCss | resources.PostCSS $opts | minify }}
|
||||
<link rel="stylesheet" href="{{ $color.Permalink }}">
|
||||
{{ end }}
|
||||
|
||||
<!-- Custom CSS to override theme properties (/static/style.css) -->
|
||||
|
Reference in New Issue
Block a user