Use Hugo for Sass processing (#9404)
* Move all Sass into a common /assets directory * Remove node-sass make command * Change head partial to accommodate full Sass rules * Bump Hugo version in Netlify config * Use separate partial for CSS imports * Bump Hugo version * Remove PostCSS from the pipeline * Un-bump version * Update Hugo version to 0.44 * Update Hugo version in Makefile * Update production Hugo version * Fix misspelled variable name * Add ./resources folder to Git * Update Hugo version in Netlify config to 0.45.1 * Use un-cached css.html partial * Re-work extra CSS logic for .Params.css
This commit is contained in:
committed by
k8s-ci-robot
parent
ac493dba99
commit
1060c00b2a
@@ -0,0 +1,33 @@
|
||||
{{- $mainSass := "sass/styles.sass" }}
|
||||
{{- $caseStudySass := "sass/case_study_styles.sass" }}
|
||||
<link rel="stylesheet" type="text/css" href="/css/base_fonts.css">
|
||||
{{- if .Site.IsServer }}
|
||||
{{- $mainCssOpts := (dict "targetPath" "css/styles.css") }}
|
||||
{{- $mainCss := resources.Get $mainSass | toCSS $mainCssOpts }}
|
||||
<link rel="stylesheet" media="screen" href="{{ $mainCss.RelPermalink }}"><!-- default styles.css on -->
|
||||
{{- else }}
|
||||
{{- $mainCssOpts := (dict "targetPath" "css/styles.css") }}
|
||||
{{- $mainCss := resources.Get $mainSass | toCSS $mainCssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" media="screen" href="{{ $mainCss.RelPermalink }}" integrity="{{ $mainCss.Data.Integrity }}"><!-- default styles.css on -->
|
||||
{{- end }}
|
||||
{{- if .Params.case_study_styles }}
|
||||
{{- $caseStudyCssOpts := (dict "targetPath" "css/styles.css") }}
|
||||
{{- $caseStudyCss := resources.Get $caseStudySass | toCSS $caseStudyCssOpts | minify | fingerprint }}
|
||||
<link rel="stylesheet" media="screen" href="{{ $caseStudyCss.Permalink }}" integrity="{{ $caseStudyCss.Data.Integrity }}"><!-- custom case_study_styles on -->
|
||||
{{- end }}
|
||||
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/callouts.css" | relURL }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/custom-jekyll/tags.css" | relURL }}">
|
||||
{{- if .Params.deprecated }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/deprecation-warning.css" | relURL }}">
|
||||
{{- end }}
|
||||
{{- if eq .Params.class "gridPage" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/gridpage.css" | relURL }}">
|
||||
{{- end }}
|
||||
{{- with .Params.css }}
|
||||
{{- range (split . ",") }}
|
||||
{{- $url := trim . " " | relURL }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $url }}"><!-- custom css added -->
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user