aboutsummaryrefslogtreecommitdiff
path: root/templates/base
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-09-06 22:40:59 +0200
committerWilliam Hergès <william@herges.fr>2025-09-06 22:40:59 +0200
commit8ae1115ba712209cb6b974e81a3a4c4745e36c94 (patch)
tree6bb54c05e1f1bcd3f39793d13867635f20da0c2a /templates/base
parent6f6f10cedcbc46ef125bd067bc8d084d29c76afe (diff)
feat(config): customize font file path, extension and name
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/base.gohtml11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/base/base.gohtml b/templates/base/base.gohtml
index 785bbaf..716b1ca 100644
--- a/templates/base/base.gohtml
+++ b/templates/base/base.gohtml
@@ -6,6 +6,17 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="{{getStaticPath "logo.png"}}" type="image/png" />
<title>{{ .Title }}</title>
+ <style>
+ {{ if ne .Data.Font "" }}
+ @font-face {
+ font-family: "custom";
+ src: url("{{ getStaticPath .Data.Font }}");
+ }
+ body {
+ --fonts: "custom";
+ }
+ {{ end }}
+ </style>
<link rel="stylesheet" href="{{getAssetPath "styles.css"}}" />
{{template "opengraph-base" .SEO}}
{{ if .Data.IsCustomPage }}