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

github.com/jsnjack/kraiklyn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYauhen Shulitski <jsnjack@gmail.com>2018-04-11 17:19:39 +0300
committerGitHub <noreply@github.com>2018-04-11 17:19:39 +0300
commit56a487ff5eab488d11dd9cff2ace49e94f15346c (patch)
tree060e29b2ebeacdfd199b4e13ea2dc6815d29a6eb
parent12fc0a688206c5078dfde501e161362565aaa07d (diff)
parent12d9ec4b87fb43a44cec8f3a81e6e0b1f7eed915 (diff)
Merge pull request #4 from shevabam/master
Ability to add custom CSS files
-rw-r--r--README.md10
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/head.html3
3 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0b1a73d..369e9e3 100644
--- a/README.md
+++ b/README.md
@@ -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>