Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/danielkvist/hugo-piercer-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielkvist <d94.zaragoza@gmail.com>2019-04-02 18:34:55 +0300
committerdanielkvist <d94.zaragoza@gmail.com>2019-04-02 18:34:55 +0300
commit2e6f6b02712c3a72aea86d09c86abbb10ad37c04 (patch)
tree545171cf8a52ad279b362113a4ce77cd5545ca66
parent7f83dfa50191f2e948bda87571c543bf1957520b (diff)
add support for Google Fonts
-rw-r--r--exampleSite/config.toml3
-rw-r--r--layouts/partials/head.html12
2 files changed, 15 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 2042ce5..6e0e245 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -56,6 +56,9 @@ themesDir = "../.."
h2 = "2.441em"
h1 = "3.052em"
+[params.googlefonts]
+ font = ""
+
[params.header]
show = true
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 2981d51..c5295a8 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -18,4 +18,16 @@
<!-- CSS Styles -->
{{ partial "styles.html" . }}
+
+ <!-- Google Fonts -->
+ {{ if $.Site.Params.googlefonts.font }}
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ $.Site.Params.googlefonts.font }}">
+
+ <style>
+ body {
+ font-family: '{{ .Site.Params.googlefonts.font }}',
+ sans-serif;
+ }
+ </style>
+ {{ end }}
</head> \ No newline at end of file