From ebc0aa6ab1898f0e3fa86337ce9c92fed78e0021 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sat, 23 Apr 2022 23:36:06 +0200 Subject: Add site description --- README.md | 2 +- layouts/partials/head.html | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0a748ce..3df38b8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ theme = "ed" [Params] # Site description. Used in meta description - description = 'Ed is a Jekyll theme designed for textual editors based on minimal computing principles, and focused on legibility and flexibility.' + description = 'Ed is a Hugo theme designed for textual editors based on minimal computing principles, and focused on legibility and flexibility.' # Color scheme. Options: red, orange, magenta, cyan, blue, brown color_scheme = '' ``` diff --git a/layouts/partials/head.html b/layouts/partials/head.html index aa500a1..d4b2a82 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,8 +4,10 @@ {{- $title := print .Title -}} {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} - {{- $description := print .Description -}} - {{ if .IsHome }}{{ $description = .Site.Params.Description }}{{ end }} + {{- $description := print .Params.Description -}} + {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} + {{ $description = .Site.Params.Description }} + {{- end -}} {{- $author := print .Site.Author.name -}} {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} @@ -36,7 +38,12 @@ - {{- /* TODO: add fb:admins and fb:app_id */}} + {{- /* TODO: add fb:admins and fb:app_id */ -}} + + {{- /* TODO: add ability to render 'article' type */ -}} + + + -- cgit v1.2.3