diff options
author | ShevAbam <shevabam@gmail.com> | 2018-04-11 17:11:55 +0300 |
---|---|---|
committer | ShevAbam <shevabam@gmail.com> | 2018-04-11 17:11:55 +0300 |
commit | 12d9ec4b87fb43a44cec8f3a81e6e0b1f7eed915 (patch) | |
tree | 060e29b2ebeacdfd199b4e13ea2dc6815d29a6eb | |
parent | 12fc0a688206c5078dfde501e161362565aaa07d (diff) |
Ability to add custom CSS files
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 |
3 files changed, 14 insertions, 0 deletions
@@ -68,3 +68,13 @@ Available values : default, green, purple, pink, red, cyan, blue, grey, orange. ## Add favicon Put `favicon.ico` inside `static` folder + + +## Add custom CSS +You can add your custom CSS files with the `customCss` parameter of the configuration file. + +```toml +customCss = ["css/custom.css", "css/custom2.css"] +``` + +Just put your files in `static/css` directory. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6fa7e6e..c60b109 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -10,6 +10,7 @@ pygmentsStyle = "monokailight" [params] externalTitle = "Kraiklyn theme" sidebarColor = "default" +customCss = [] [[menu.shortcuts]] name = "Kraiklyn on Github" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e67b5b0..5665799 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,6 +11,9 @@ <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> <link rel="stylesheet" href="{{ .Site.BaseURL }}css/styles.css"> + {{ range .Site.Params.customCss -}} + <link rel="stylesheet" href="{{ . | absURL }}"> + {{- end }} <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> </head> |