Skip to content

Commit 4e92033

Browse files
author
Aytackydln
committed
inline css and js
1 parent d2ee3b1 commit 4e92033

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

themes/aurora/layouts/partials/head.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
{{ else }}
2626
<title>{{ default $.Site.Title .Title }} •{{ if .Section }}{{ printf " %s •" .Section }}{{ end }} Aurora Docs</title>
2727
{{ end }}
28-
{{ $styles := resources.Get "scss/main.scss" | toCSS | minify | fingerprint }}
29-
<link rel="stylesheet" href="{{ $styles.Permalink }}">
28+
{{ with resources.Get "scss/main.scss" | toCSS | minify | fingerprint }}
29+
<style>{{ .Content | safeCSS }}</style>
30+
{{ end }}
3031
<link rel="icon" href="{{ "favicon.ico" | relURL }}">

themes/aurora/layouts/partials/scripts.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
{{ $scroll := resources.Get "js/scroll-offset.js" }}
55
{{ $simplebar := resources.GetRemote "https://unpkg.com/simplebar@latest/dist/simplebar.min.js" }}
66
{{ $scripts := slice $externalLink $tabs $mobile $scroll $simplebar | resources.Concat "app.js" | minify | fingerprint }}
7-
<script type="text/javascript" src="{{ $scripts.Permalink }}"></script>
7+
{{ with $scripts }}
8+
<script>{{ .Content | safeJS }}</script>
9+
{{ end }}

0 commit comments

Comments
 (0)