mirror of https://github.com/grpc/grpc.io.git
19 lines
885 B
HTML
19 lines
885 B
HTML
{{/* This file is in place as an override to Docsy */ -}}
|
|
|
|
{{ $inServerMode := site.IsServer -}}
|
|
{{ $includePaths := (slice "node_modules") -}}
|
|
{{ $scssMain := "scss/main.scss" -}}
|
|
{{ $cssOutput := "css/style.css" -}}
|
|
{{ $devOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "enableSourceMap" true) -}}
|
|
{{ $prodOpts := (dict "targetPath" $cssOutput "includePaths" $includePaths "outputStyle" "compressed") -}}
|
|
{{ $cssOpts := cond $inServerMode $devOpts $prodOpts -}}
|
|
{{ $css := resources.Get $scssMain | toCSS $cssOpts -}}
|
|
|
|
{{ if $inServerMode -}}
|
|
<link href="{{ $css.RelPermalink }}" rel="stylesheet">
|
|
{{ else -}}
|
|
{{ $prodCss := $css | postCSS | minify | fingerprint -}}
|
|
<link rel="preload" href="{{ $prodCss.RelPermalink }}" as="style">
|
|
<link href="{{ $prodCss.RelPermalink }}" rel="stylesheet" integrity="{{ $prodCss.Data.integrity }}">
|
|
{{ end -}}
|