Get SCSS compilation working

This commit is contained in:
Jez Cope 2021-03-30 12:04:04 +01:00
parent f4735db2ae
commit 6d4c5de025
3 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,3 @@
$main-font-family: 'Iosevka Etoile', sans-serif;
$header-font-family: 'Iosevka Aile', sans-serif;

9
assets/style/main.scss Normal file
View File

@ -0,0 +1,9 @@
@import '_variables.scss';
html {
font-family: $main-font-family;
}
h1, h2, h3, h4, h5, h6 {
font-family: $header-font-family;
}

View File

@ -7,7 +7,8 @@
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
{{ $style := resources.Get "style/main.scss" | resources.ToCSS }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}