Configurable webfonts file name

This commit is contained in:
Nishanth Shanmugham
2015-08-24 23:08:32 -05:00
parent b234033bff
commit 1b5cab40a8
2 changed files with 6 additions and 1 deletions

View File

@@ -52,7 +52,7 @@ $ hugo new fixed/about.md
## Fonts and Colors
The primary font face is Proxima Nova in 400 and 700 weights. If you own the font, create a font face declarations like in the example below, and place it in `static/css/webfonts.css`:
The primary font face is Proxima Nova in 400 and 700 weights. If you own the font, create a font face declarations like in the example below, and place it in the path specified in [`.Site.Params.WebfontsFile`](#site-variables):
````css
@font-face {
@@ -108,6 +108,7 @@ GitHub = "//github.com/username"
Lang = "en" # <body lang="en">
LinkedIn = "//linkedin.com/in/username"
Twitter = "//twitter.com/username"
WebfontsFile = "/css/mywebfontsfile.css" # relative to static directory, defaults to /css/webfonts.css
````
# Extras

View File

@@ -2,7 +2,11 @@
<link rel="stylesheet" href="/css/reset.css">
<link rel="stylesheet" href="/css/pygments.css">
<link rel="stylesheet" href="/css/main.css">
{{ if .Site.Params.WebfontsFile }}
<link rel="stylesheet" href="{{ .Site.Params.WebfontsFile }}">
{{ else }}
<link rel="stylesheet" href="/css/webfonts.css">
{{ end }}
<!-- Icon -->
<link rel="shortcut icon"