scss: improve the scss pipe
- Adds the fingerprint of the processed css files. Co-Authored-by: iGor milhit <igor@milhit.ch>dev
							parent
							
								
									0c6ae76ed9
								
							
						
					
					
						commit
						83f45fefff
					
				|  | @ -18,12 +18,12 @@ | |||
|     "targetPath" "styles.css" | ||||
|     "includePaths" (slice "node_modules") | ||||
|   ) -}} | ||||
|   {{- $styles := resources.Get "scss/main.scss" | toCSS $options | minify -}} | ||||
|   <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen"> | ||||
|   {{- $styles := resources.Get "scss/main.scss" | toCSS $options | minify | fingerprint -}} | ||||
|   <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen"> | ||||
|   {{- end }} | ||||
|   {{ $options := (dict "targetPath" "print.css" ) -}} | ||||
|   {{- $print := resources.Get "css/gutenberg.css" | toCSS $options | minify -}} | ||||
|   <link rel="stylesheet" href="{{ $print.Permalink }}" media="print"> | ||||
|   {{- $print := resources.Get "css/gutenberg.css" | toCSS $options | minify | fingerprint -}} | ||||
|   <link rel="stylesheet" href="{{ $print.Permalink }}" integrity="{{ $print.Data.Integrity }}" media="print"> | ||||
|   {{ range .AlternativeOutputFormats }} | ||||
|   {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} | ||||
|   {{ end }} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue