diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-09-29 19:17:13 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-10-01 07:51:11 +0200 |
| commit | 4c41e477e13d37e187c8de4225c7e8056bd9ed28 (patch) | |
| tree | 33a7b51a0ed2c2ae207fc8f89f1454ccb77596a5 /layouts/partials/head/styles.html | |
| parent | 4720b07e9f18915cf1f6466245a92dedd11fdc55 (diff) | |
Internalise theme
Diffstat (limited to 'layouts/partials/head/styles.html')
| -rw-r--r-- | layouts/partials/head/styles.html | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/layouts/partials/head/styles.html b/layouts/partials/head/styles.html index 68577ce..cfab45a 100644 --- a/layouts/partials/head/styles.html +++ b/layouts/partials/head/styles.html @@ -1,13 +1,17 @@ -{{/* Resources */}} -{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}} +{{/* Resources */}} +{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}} -{{/* Processor */}} -{{- $styles := slice $tailwind | resources.Concat "css/app.css" -}} +{{/* MathJax */}} +<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> +<script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });</script> -{{/* Output */}} +{{/* Processor */}} +{{- $styles := slice $tailwind | resources.Concat "css/app.css" -}} + +{{/* Output */}} {{- if eq hugo.Environment "development" -}} -<link rel="stylesheet" href="{{ $styles.Permalink | absURL }}"> -{{- else -}} -{{- $styles := $styles | minify | fingerprint | resources.PostProcess -}} -<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" > + <link rel="stylesheet" href="{{ $styles.Permalink | absURL }}" /> +{{- else -}} + {{- $styles := $styles | minify | fingerprint | resources.PostProcess -}} + <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" /> {{- end -}} |
