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

github.com/joway/hugo-theme-yinyang.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoway.CI <joway.w@gmail.com>2020-06-11 08:35:27 +0300
committerJoway.CI <joway.w@gmail.com>2020-06-11 08:35:27 +0300
commit7b33ebb9a56995fe3ee456a75c876b72f9eca654 (patch)
tree35cf6c23955a3741f6ba93372421b6863e38b55c
parentfc771aa92c16bb51865de2c3cc676a2642835d3a (diff)
[ImgBot] Optimize images (#13)
-rw-r--r--README.md9
-rw-r--r--layouts/partials/head.html5
-rw-r--r--theme.toml2
3 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 6b06ce0..b1316f9 100644
--- a/README.md
+++ b/README.md
@@ -83,6 +83,13 @@ link = "https://github.com/joway"
extraHead = '<script src="xxxx.js"></script>'
```
+### Extra CSS files
+
+```
+[params]
+extraCSSFiles = ["css/foo.css", "css/bar.css"]
+```
+
### Insert content on every post
```
@@ -127,4 +134,6 @@ name = "Github"
link = "https://github.com/joway"
postHeaderContent = ""
postFooterContent = "<br/><br/><p>Subscribe to:<a target='_blank' href='https://mailchi.mp/a1a0d59e7a19/joway'>Joway's Blog</a></p>"
+# extraCSSFiles = ["css/foo.css", "css/bar.css"]
+extraCSSFiles = []
```
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 334c1c3..dba08b0 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -40,6 +40,11 @@
<link rel="stylesheet" href="{{ .Site.Params.staticPrefix }}{{ "css/highlight/tomorrow.min.css" | relURL }}" />
{{- end }}
<link rel="stylesheet" href="{{ "css/index.css" | relURL }}">
+
+ {{ range .Site.Params.extraCSSFiles -}}
+ <link rel="stylesheet" href="{{ .Site.Params.staticPrefix }}{{ . | relURL }}">
+ {{- end }}
+
<link href="{{ .Site.Params.staticPrefix }}{{ "index.xml" | relURL }}" rel="alternate" type="application/rss+xml"
title="{{ .Site.Title }}">
<!-- fonts -->
diff --git a/theme.toml b/theme.toml
index a6428d9..8d32030 100644
--- a/theme.toml
+++ b/theme.toml
@@ -17,6 +17,8 @@ min_version = "0.50"
[params]
staticPrefix = ""
+# extraCSSFiles = ["css/foo.css", "css/bar.css"]
+extraCSSFiles = []
[author]
name = "Joway Wang"