Skip to content

Commit

Permalink
added fingerprinting
Browse files Browse the repository at this point in the history
  • Loading branch information
jd4no committed Oct 10, 2018
1 parent 6f9d5c8 commit f0cccf7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions layouts/partials/header/styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

{{ $options := (dict "outputStyle" "compressed" "enableSourceMap" true) }}

{{ $style := resources.Get "scss/hyde-hyde.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $style := resources.Get "scss/hyde-hyde.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">

{{ $printStyle := resources.Get "scss/print.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $printStyle.Permalink }}" media="print">
{{ $printStyle := resources.Get "scss/print.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $printStyle.Permalink }}" integrity="{{ $printStyle.Data.Integrity }}" media="print">

{{ with .Site.Params.toc }}
{{ if eq . "hugo" }}
{{ $hugoToc := resources.Get "scss/hugo-toc.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $hugoToc.Permalink }}">
{{ $hugoToc := resources.Get "scss/hugo-toc.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $hugoToc.Permalink }}" integrity="{{ $hugoToc.Data.Integrity }}">
{{ else if eq . "tocbot"}}
{{ $tocbot := resources.Get "scss/tocbot.scss" | resources.ToCSS $options }}
<link rel="stylesheet" href="{{ $tocbot.Permalink }}">
{{ $tocbot := resources.Get "scss/tocbot.scss" | toCSS $options | fingerprint }}
<link rel="stylesheet" href="{{ $tocbot.Permalink }}" integrity="{{ $tocbot.Data.Integrity }}">
{{ end }}
{{ end }}

0 comments on commit f0cccf7

Please sign in to comment.