added support for the meta description tag (#57)

* added support for the meta description tag

* Update meta description logic for single page

Co-authored-by: hossainemruz <emruz@appscode.com>
This commit is contained in:
Ayoze Fernández 2020-08-06 16:50:20 +01:00 committed by GitHub
parent 629c7196a3
commit 5f48a5bacb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View file

@ -75,9 +75,12 @@ enableEmoji: true
# Custom parameters
params:
# copyright
# Copyright Notice
copyright: © 2020 Copyright.
# Meta description for your site. This will help the search engines to find your site.
description: Portfolio and personal blog of Jane Doe.
# background image of the landing page
background: "images/background.jpg"

View file

@ -24,9 +24,12 @@ enableEmoji: true
# Custom parameters
params:
# copyright
# Copyright Notice
copyright: © 2020 Copyright.
# Meta description for your site. This will help the search engines to find your site.
description: Portfolio and personal blog of Jane Doe.
# background image of the landing page
background: "images/background.jpg"

View file

@ -1,4 +1,5 @@
{{ define "header" }}
<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Title }}{{ end }}" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css"

View file

@ -2,6 +2,7 @@
<html lang="en">
<head>
<title>{{- .Site.Title -}}</title>
<meta name="description" content="{{ .Site.Params.description }}" />
<!-- import common headers -->
{{- partial "header.html" . -}}