diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-12-21 21:34:02 -0330 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-12-21 21:34:02 -0330 |
| commit | ad1bb9787eb2317571cd3d1bfcd5a8b22df4803f (patch) | |
| tree | 9b5dba33f39458f9bec6824db59f26870251d521 /themes/aoidh/layouts/_partials/head | |
| download | samanthony.xyz-1.0.0.zip | |
init hugov1.0.0
Diffstat (limited to 'themes/aoidh/layouts/_partials/head')
| -rw-r--r-- | themes/aoidh/layouts/_partials/head/css.html | 9 | ||||
| -rw-r--r-- | themes/aoidh/layouts/_partials/head/js.html | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/themes/aoidh/layouts/_partials/head/css.html b/themes/aoidh/layouts/_partials/head/css.html new file mode 100644 index 0000000..d76d23a --- /dev/null +++ b/themes/aoidh/layouts/_partials/head/css.html @@ -0,0 +1,9 @@ +{{- with resources.Get "css/main.css" }} + {{- if hugo.IsDevelopment }} + <link rel="stylesheet" href="{{ .RelPermalink }}"> + {{- else }} + {{- with . | minify | fingerprint }} + <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> + {{- end }} + {{- end }} +{{- end }} diff --git a/themes/aoidh/layouts/_partials/head/js.html b/themes/aoidh/layouts/_partials/head/js.html new file mode 100644 index 0000000..16ffbed --- /dev/null +++ b/themes/aoidh/layouts/_partials/head/js.html @@ -0,0 +1,16 @@ +{{- with resources.Get "js/main.js" }} + {{- $opts := dict + "minify" (not hugo.IsDevelopment) + "sourceMap" (cond hugo.IsDevelopment "external" "") + "targetPath" "js/main.js" + }} + {{- with . | js.Build $opts }} + {{- if hugo.IsDevelopment }} + <script src="{{ .RelPermalink }}"></script> + {{- else }} + {{- with . | fingerprint }} + <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script> + {{- end }} + {{- end }} + {{- end }} +{{- end }} |