diff options
author | Andries <andries.vanhumbeeck@outlook.com> | 2020-06-12 11:58:45 +0300 |
---|---|---|
committer | Andries <andries.vanhumbeeck@outlook.com> | 2020-06-12 11:58:45 +0300 |
commit | ef65d542411ea0b35dd6b9a723f62fa507e115dd (patch) | |
tree | de3aa15ecc4d977442a53778e95a359375aa0766 | |
parent | 7980b976cfc62ab3ed1c852c47ea00b112f01b63 (diff) |
add homepage description
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a95e7c3..a90ec57 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -21,6 +21,7 @@ theme = "diary" [params] subtitle = "Themed by Diary." enableGitalk = true +homePageDescription = "My HomePage Description" [params.gitalk] owner = "user" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 588d07e..1277fd7 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,7 +6,7 @@ <meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerification }}"> <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"> <meta content="telephone=no" name="format-detection"> -<meta name="description" content="{{ .Params.description }}"> +<meta name="description" content="{{if .IsHome}}{{ .Site.Params.homePageDescription }}{{else}}{{ .Params.description }}{{end}}"> <meta name="renderer" content="webkit"> <meta name="theme-color" content="#ffffff"> <!-- metadata --> |