diff options
author | Kellen <root@goodroot.ca> | 2018-03-25 05:51:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-25 05:51:14 +0300 |
commit | e28d1cb6083bbe0be304650ec1122b4be7862a97 (patch) | |
tree | fc8149fcde9d1234ca2294b008741873a937c85b | |
parent | 66353e0132b6768246ea614368decbb93747c7c3 (diff) | |
parent | 3af39a4e456e76bfbb3dfa93f31dcb2d473f2ed6 (diff) |
Merge pull request #3 from jlumbroso/master
Add ability to import custom CSS files without overwriting templates
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | exampleSite/static/css/theme-override.css | 1 | ||||
-rw-r--r-- | layouts/partials/header.html | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index b74a314..f5ff3dd 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -30,3 +30,4 @@ footnotereturnlinkcontents = "↩" [params] description = "A simple, minimal blog for those who love text." footer = "Open-Source | [Github](https://github.com/goodroot/hugo-classic) | [Twitter](https://twitter.com/thegoodroot)" + custom_css = ["css/theme-override.css"] diff --git a/exampleSite/static/css/theme-override.css b/exampleSite/static/css/theme-override.css new file mode 100644 index 0000000..c761e7f --- /dev/null +++ b/exampleSite/static/css/theme-override.css @@ -0,0 +1 @@ +footer { font-size: 90%; font-family: monospace; } diff --git a/layouts/partials/header.html b/layouts/partials/header.html index d662790..6ef9a69 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -6,6 +6,9 @@ <title>{{ .Title }} | {{ .Site.Title }}</title> <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}" /> <link rel="stylesheet" href="{{ "/css/fonts.css" | relURL }}" /> + {{ range .Site.Params.custom_css -}} + <link rel="stylesheet" href="{{ . | absURL }}"> + {{- end }} {{ partial "head_custom.html" . }} </head> |