From 70f431ea1803b2bf6daa8e964064bb8ecc9fa70a Mon Sep 17 00:00:00 2001 From: FarisZR <35614734+FarisZR@users.noreply.github.com> Date: Sat, 22 Oct 2022 12:56:38 +0300 Subject: 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) --- exampleSite/config.yaml | 3 +++ layouts/partials/data/description.html | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index f723d96..c1b48dd 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -8,15 +8,18 @@ languages: en: languageName: English title: Example Site + description: Example description weight: 1 zh-cn: languageName: 中文 title: 演示站点 + description: 演示说明 weight: 2 ar: languageName: عربي languagedirection: rtl title: موقع تجريبي + description: وصف تجريبي weight: 3 # Change it to your Disqus shortname before using diff --git a/layouts/partials/data/description.html b/layouts/partials/data/description.html index f63d603..4f54e5c 100644 --- a/layouts/partials/data/description.html +++ b/layouts/partials/data/description.html @@ -1,6 +1,11 @@ {{ $description := .Site.Params.sidebar.subtitle }} + +{{ if .Site.Params.description }} + {{ $description = .Site.Params.description }} +{{ end }} + {{ if .Description }} {{ $description = .Description }} -- cgit v1.2.3