Opsplitsen van style in head, zodat deze gecached kan worden

This commit is contained in:
Michael Boelen 2023-05-15 11:05:45 +02:00
parent 7e48f8e418
commit 4342d322e0
3 changed files with 5 additions and 3 deletions

View file

@ -44,5 +44,6 @@
</section> </section>
</div> </div>
</main> </main>
{{ partial "footer.html" . }}
</body> </body>
</html> </html>

View file

@ -12,9 +12,7 @@
<link rel="alternate" type="application/atom+xml" title="{{ .Site.Title }}" href="{{ absURL "atom.xml" }}" /> <link rel="alternate" type="application/atom+xml" title="{{ .Site.Title }}" href="{{ absURL "atom.xml" }}" />
<link rel="alternate" type="application/json" title="{{ .Site.Title }}" href="{{ absURL "feed.json" }}" /> <link rel="alternate" type="application/json" title="{{ .Site.Title }}" href="{{ absURL "feed.json" }}" />
<link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII="> <link rel="shortcut icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=">
{{ $styles := resources.Get "scss/styles.scss" | toCSS (dict "outputStyle" "compressed") | minify }} {{ partialCached "style.html" . }}
{{ $styles_extra := resources.Get "scss/_extra.scss" | toCSS (dict "outputStyle" "compressed") | minify }}
<style>{{ $styles.Content | safeCSS }} {{ $styles_extra.Content | safeCSS }}</style>
<!-- <!--
{{ if .IsHome -}} {{ if .IsHome -}}
<script type="application/ld+json"> <script type="application/ld+json">

View file

@ -0,0 +1,3 @@
{{ $styles := resources.Get "scss/styles.scss" | toCSS (dict "outputStyle" "compressed") | minify }}
{{ $styles_extra := resources.Get "scss/_extra.scss" | toCSS (dict "outputStyle" "compressed") | minify }}
<style>{{ $styles.Content | safeCSS }} {{ $styles_extra.Content | safeCSS }}</style>