aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/head/styles.html
blob: cfab45afe132364250aac5b794c885770b044cc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

{{/* Resources */}} 
{{- $tailwind := resources.Get "css/tailwind.css" | postCSS (dict "config" "./config/postcss.config.js") -}}

{{/* 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>

{{/* 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 }}" />
{{- end -}}