-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(website): bump hugo to latest version (#22018)
feat: update components to work with latest version of hugo
- Loading branch information
1 parent
df0fbc1
commit 68622bc
Showing
2 changed files
with
39 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
{{ $serverMode := site.IsServer }} | ||
{{ $serverMode := hugo.IsServer }} | ||
{{ $isHome := .IsHome }} | ||
{{ $cssInputs := site.Params.css }} | ||
{{ $includePaths := slice "node_modules" }} | ||
{{ $devOpts := dict "includePaths" $includePaths "enableSourceMap" true }} | ||
{{ $prodOpts := dict "includePaths" $includePaths "outputStyle" "compressed" }} | ||
{{ $cssOpts := cond $serverMode $devOpts $prodOpts }} | ||
{{ $postCssOpts := dict "inlineImports" true }} | ||
{{ $devOpts := dict "includePaths" $includePaths "enableSourceMap" true }} | ||
{{ $prodOpts := dict "includePaths" $includePaths "outputStyle" "compressed" }} | ||
{{ $cssOpts := cond $serverMode $devOpts $prodOpts }} | ||
{{ $postCssOpts := dict "inlineImports" true }} | ||
{{ $ctx := . }} | ||
|
||
{{ range $cssInputs }} | ||
{{ $opts := merge $cssOpts (dict "targetPath" .output) }} | ||
|
||
{{ $postProcess := .post_process }} | ||
{{ $css := resources.Get .input | resources.ExecuteAsTemplate .input $ctx | toCSS $opts }} | ||
|
||
{{ if .postcss }} | ||
{{ $css = $css | postCSS $postCssOpts }} | ||
{{ end }} | ||
|
||
{{ if not (and (not $isHome) .home_page_only) }} | ||
{{ if $serverMode }} | ||
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> | ||
{{ else }} | ||
{{ $css = $css | fingerprint }} | ||
|
||
{{ if $postProcess }} | ||
{{ $css = $css | resources.PostProcess }} | ||
{{ end }} | ||
|
||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}"> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ $opts := merge $cssOpts (dict "targetPath" .output) }} | ||
{{ $postProcess := .post_process }} | ||
{{ $css := resources.Get .input | resources.ExecuteAsTemplate .input $ctx | toCSS $opts }} | ||
{{ if .postcss }} | ||
{{ $css = $css | postCSS $postCssOpts }} | ||
{{ end }} | ||
{{ if not (and (not $isHome) .home_page_only) }} | ||
{{ if $serverMode }} | ||
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> | ||
{{ else }} | ||
{{ $css = $css | fingerprint }} | ||
{{ if $postProcess }} | ||
{{ $css = $css | resources.PostProcess }} | ||
{{ end }} | ||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}"> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters