diff options
author | Chen Xianmin <xianmin12@gmail.com> | 2018-05-24 14:33:11 +0300 |
---|---|---|
committer | Chen Xianmin <xianmin12@gmail.com> | 2018-05-24 14:33:11 +0300 |
commit | da646018a58671df864a97daa71d4307ca22c93e (patch) | |
tree | 44bdbf339d2f6cec725f5f45e29fd816b8850559 | |
parent | ad5b5e0583ea304474580f7c07b51d6d849ff1aa (diff) |
feat: add option 'fork-me-on-github'
-rw-r--r-- | dev-config.toml | 3 | ||||
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 10 |
3 files changed, 16 insertions, 0 deletions
diff --git a/dev-config.toml b/dev-config.toml index 2e98d0a..e003ad8 100644 --- a/dev-config.toml +++ b/dev-config.toml @@ -151,6 +151,9 @@ defaultContentLanguage = "en" # Default language to use (if you setup multiling customCSS = [] # if ['custom.css'], load '/static/css/custom.css' file customJS = [] # if ['custom.js'], load '/static/js/custom.js' file + # enable 'fork me on github', https://blog.github.com/2008-12-19-github-ribbons/ + forkMeOnGithub = "https://github.com/xianmin/hugo-theme-jane" + [params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义 enable = false jquery = '<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>' diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 04acb84..8e84cc2 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -103,6 +103,9 @@ defaultContentLanguage = "en" # Default language to use customCSS = [] # if ['custom.css'], load '/static/css/custom.css' file customJS = [] # if ['custom.js'], load '/static/js/custom.js' file + # enable 'fork me on github', see https://blog.github.com/2008-12-19-github-ribbons/ + # forkMeOnGithub = "https://github.com/xianmin/hugo-theme-jane" + [params.publicCDN] # load these files from public cdn # 启用公共CDN,需自行定义 enable = false jquery = '<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>' diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index da15b83..0d002f4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,9 +12,19 @@ </head> <body> {{ partial "slideout.html" . }} + {{ if or .Site.Params.photoswipe .Site.Params.fancybox }} {{ partial "photoswipe.html" }} {{ end }} + + {{ if .Site.Params.forkMeOnGithub }} + <a href="{{ .Site.Params.forkMeOnGithub }}"> + <img style="position: absolute; top: 0; left: 0; border: 0;" + src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png" + alt="Fork me on GitHub"> + </a> + {{ end }} + <header id="header" class="header container"> {{ partial "header.html" . }} </header> |