Explorar o código

Ability to add extra custom CSS (#22)

Khosrow Moossavi %!s(int64=7) %!d(string=hai) anos
pai
achega
9a070c2380
Modificáronse 2 ficheiros con 7 adicións e 0 borrados
  1. 3 0
      exampleSite/config.toml
  2. 4 0
      layouts/_default/baseof.html

+ 3 - 0
exampleSite/config.toml

@@ -23,6 +23,9 @@ disqusShortname = "yourdiscussshortname"
     hideCredits = false
     hideCopyright = false
 
+    # Custom CSS
+	custom_css = []
+
 [[params.social]]
     name = "Github"
     weight = 1

+ 4 - 0
layouts/_default/baseof.html

@@ -18,6 +18,10 @@
     <link rel="stylesheet" href="//cdn.rawgit.com/necolas/normalize.css/master/normalize.css">
     <link rel="stylesheet" href="{{ "css/style.min.css" | absURL }}">
 
+    {{ range .Site.Params.custom_css }}
+      <link rel="stylesheet" href="{{ . | absURL }}">
+    {{ end }}
+
     <link rel="icon" type="image/png" href="{{ "/images/favicon-32x32.png" | absURL }}" sizes="32x32">
     <link rel="icon" type="image/png" href="{{ "/images/favicon-16x16.png" | absURL }}" sizes="16x16">