mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 18:31:45 +01:00
feat: add a separate configuration field for site description (#672)
* Add an optional site description option * Add site description to the example site (Chinese Auto-translated)
This commit is contained in:
parent
30fdd000f9
commit
70f431ea18
2 changed files with 8 additions and 0 deletions
|
@ -8,15 +8,18 @@ languages:
|
||||||
en:
|
en:
|
||||||
languageName: English
|
languageName: English
|
||||||
title: Example Site
|
title: Example Site
|
||||||
|
description: Example description
|
||||||
weight: 1
|
weight: 1
|
||||||
zh-cn:
|
zh-cn:
|
||||||
languageName: 中文
|
languageName: 中文
|
||||||
title: 演示站点
|
title: 演示站点
|
||||||
|
description: 演示说明
|
||||||
weight: 2
|
weight: 2
|
||||||
ar:
|
ar:
|
||||||
languageName: عربي
|
languageName: عربي
|
||||||
languagedirection: rtl
|
languagedirection: rtl
|
||||||
title: موقع تجريبي
|
title: موقع تجريبي
|
||||||
|
description: وصف تجريبي
|
||||||
weight: 3
|
weight: 3
|
||||||
|
|
||||||
# Change it to your Disqus shortname before using
|
# Change it to your Disqus shortname before using
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<!-- Use site subtitle by default -->
|
<!-- Use site subtitle by default -->
|
||||||
{{ $description := .Site.Params.sidebar.subtitle }}
|
{{ $description := .Site.Params.sidebar.subtitle }}
|
||||||
|
|
||||||
|
<!-- Seprate description exists -->
|
||||||
|
{{ if .Site.Params.description }}
|
||||||
|
{{ $description = .Site.Params.description }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Description }}
|
{{ if .Description }}
|
||||||
<!-- Page description exists -->
|
<!-- Page description exists -->
|
||||||
{{ $description = .Description }}
|
{{ $description = .Description }}
|
||||||
|
|
Loading…
Reference in a new issue