diff options
-rw-r--r-- | archetypes/default.md | 1 | ||||
-rw-r--r-- | assets/sass/_list.scss | 9 | ||||
-rw-r--r-- | exampleSite/config.toml | 12 | ||||
-rw-r--r-- | layouts/_default/single.html | 9 |
4 files changed, 26 insertions, 5 deletions
diff --git a/archetypes/default.md b/archetypes/default.md index 0d11b0d..5f12156 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,4 +3,5 @@ title = "{{ replace .Name "-" " " | title }}" date = {{ .Date }} description = "" tags = [] +noLicense = false +++ diff --git a/assets/sass/_list.scss b/assets/sass/_list.scss index d9bad6e..57f9fe9 100644 --- a/assets/sass/_list.scss +++ b/assets/sass/_list.scss @@ -55,6 +55,13 @@ article { padding-bottom: 1.5em; } -#post-comment { +#license { + @include link-primary(); + + margin-bottom: 1.5em; +} + +// not show while iframe not loaded +#post-comment .utterances-frame { border-top: $spliter; }
\ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6dc23e1..6ba90df 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,12 +18,16 @@ paginate = 10 # Bangumi image chart id # bgmImageChart = "000000" + # License + license = "知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 (CC BY-NC-SA 4.0)" + licenseLink = "http://creativecommons.org/licenses/by-nc-sa/4.0/" + # Comments # utterances, see: https://utteranc.es/ - cdnUtterancesJS = "https://utteranc.es/client.js" - utterancesRepo = "[ENTER REPO HERE]" - utterancesIssueTerm = "pathname" - utterancesTheme = "github-light" + # cdnUtterancesJS = "https://utteranc.es/client.js" + # utterancesRepo = "[ENTER REPO HERE]" + # utterancesIssueTerm = "pathname" + # utterancesTheme = "github-light" # Custom lazyload thumbnail cdnLazyloadSRC = "https://cdn.jsdelivr.net/gh/amzrk2/poal-jsdelivr/lazyload/dsr_loading.svg" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b21c511..0d564b0 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,7 +14,16 @@ {{ .Content }} </div> </article> + {{ if ne .Params.noLicense true }} + <div class="markdown-body" id="license"> + <blockquote> + <p>除特殊注明部分,本作品采用 <a rel="license" href="{{ .Site.Params.licenseLink }}" target="_blank">{{ .Site.Params.license }}</a> 进行许可。</p> + </blockquote> + </div> + {{ end }} + {{ if .Site.Params.cdnUtterancesJS }} {{ partial "comment-utterances.html" . }} + {{ end }} </div> <!-- sidebar --> <div class="col-md-3 col-12 float-left" id="sidebar"> |