Skip to content

Commit

Permalink
Include Font Awesome webfonts
Browse files Browse the repository at this point in the history
  • Loading branch information
janheinrichmerker committed Mar 3, 2024
1 parent f7d74b2 commit 7a201b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layouts/partials/site/styles.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{{- $options := dict "transpiler" "dartsass" "outputStyle" "compressed" -}}
{{- $style := resources.Get "/css/main.scss" | resources.ToCSS $options -}}
<link rel="stylesheet" href="{{ $style.Permalink }}">

{{/* Publish Font Awesome web fonts. */}}
{{- $fontawesomeWebfonts := resources.Match "/node_modules/@fortawesome/fontawesome-free/webfonts/*" -}}
{{- range $fontawesomeWebfonts -}}
{{- $name := .Name | strings.TrimPrefix "/node_modules/@fortawesome/fontawesome-free/webfonts/" | printf "/webfonts/fontawesome/%s" -}}
{{- with resources.Copy $name . -}}
{{- .Publish -}}
{{- end -}}
{{- end -}}

0 comments on commit 7a201b4

Please sign in to comment.