mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
theme: unsupport description in hugo.toml #845
This commit is contained in:
parent
bc13ade3e1
commit
79b42f95a8
11 changed files with 19 additions and 19 deletions
|
@ -29,7 +29,7 @@ defaultContentLanguage = "en"
|
|||
title = "Hugo Relearn Theme"
|
||||
|
||||
# Don't use any auto-generated summaries
|
||||
summaryLength = 0
|
||||
summaryLength = 10
|
||||
|
||||
[outputs]
|
||||
# add `json` to the home to support Lunr search; This is a mandatory setting
|
||||
|
|
|
@ -19,13 +19,6 @@ author.name = "Sören Weber"
|
|||
# This can be overridden in the page's frontmatter.
|
||||
images = [ "images/hero.png" ]
|
||||
|
||||
# The description of your site.
|
||||
# Default: not set
|
||||
# This is used for generating HTML meta tags, social media meta information
|
||||
# for the opengraph protocol and twitter cards.
|
||||
# This can be overridden in the page's frontmatter.
|
||||
description = "Documentation for Hugo Relearn Theme"
|
||||
|
||||
# Admin options for social media.
|
||||
# Default: not set
|
||||
# Configuration for the Open Graph protocol and Twitter Cards adhere to Hugo's
|
||||
|
|
|
@ -32,6 +32,12 @@ This document shows you what's new in the latest release and flags it with one o
|
|||
--CODE-theme: monokai;
|
||||
````
|
||||
|
||||
- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The parameter `description` in your `hugo.toml` will now been ignored.
|
||||
|
||||
With the newly introduces unified handling of descriptions throughout the theme, the only place the old parameter would have been used was your home page.
|
||||
|
||||
For migration, move the `description` parameter of your `hugo.toml` into the frontmatter section of your home page.
|
||||
|
||||
- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The frontmatter option `menuTitle` is now unsupported in favor for Hugo’s own `linkTitle`.
|
||||
|
||||
Additionally, if set `linkTitle` will now be used instead of `title` to generate the breadcrumb.
|
||||
|
@ -46,8 +52,6 @@ This document shows you what's new in the latest release and flags it with one o
|
|||
|
||||
Previously, the summary erroneously was ignored which now can lead to different output if you set `description=true` as a parameter.
|
||||
|
||||
In addition, all places where descriptions are printed, now behave in the same way.
|
||||
|
||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The [`include` shortcode](shortcodes/include) is now able to resolve links to resources as well as to files in the file system (the old behavior). You can configure to generate warnings or errors during build by setting `include.errorlevel` to either `warning` or `error` in your `hugo.toml` if a path can not be resolved.
|
||||
|
||||
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Math is now usable without enclosing it in a shortcode or codefence by using Hugo's [passthrough configuration](shortcodes/math#passthrough-configuration).
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"title" (partial "pageHelper/title.hugo" (dict "page" .))
|
||||
"tags" .Params.tags
|
||||
"breadcrumb" (trim ((partial "breadcrumbs.html" (dict "page" . "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ")
|
||||
"description" (or .Description .Summary site.Params.Description)
|
||||
"description" (or .Description .Summary)
|
||||
"content" (.Plain | htmlUnescape)
|
||||
) }}
|
||||
{{- end }}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"title" (partial "pageHelper/title.hugo" (dict "page" .))
|
||||
"tags" .Params.tags
|
||||
"breadcrumb" (trim ((partial "breadcrumbs.html" (dict "page" . "dirOnly" true)) | plainify | htmlUnescape) "\n\r\t ")
|
||||
"description" (or .Description .Summary site.Params.Description)
|
||||
"description" (or .Description .Summary)
|
||||
"content" (.Plain | htmlUnescape)
|
||||
) }}
|
||||
{{- end }}
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
{{- errorf "The Relearn theme requires Hugo %s or later" $hugoVersion }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Site.Params.description }}
|
||||
{{- warnf "UNSUPPORTED usage of 'params.description' config parameter found, move it to the frontmatter of your home page; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" }}
|
||||
{{- end }}
|
||||
<html lang="{{ .Page.Language.LanguageCode | default "en" }}" dir="{{ .Page.Language.LanguageDirection | default (T "Reading-direction") | default "ltr" }}">
|
||||
<head>
|
||||
{{- partial "meta.html" . }}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{{- if not (and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSeoHiddenPages true) ) ) }}
|
||||
<meta name="robots" content="noindex, nofollow, noarchive, noimageindex">
|
||||
{{- end }}
|
||||
<meta name="description" content="{{ with or .Description .Summary site.Params.Description }}{{ . }}{{ end }}">
|
||||
<meta name="description" content="{{ with or .Description .Summary }}{{ . }}{{ end }}">
|
||||
{{- $authorName := partialCached "authorname.hugo" . }}
|
||||
<meta name="author" content="{{ $authorName }}">
|
||||
{{- partial "twitter_cards.html" . }}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{{- end }}
|
||||
<meta property="og:title" content="{{ partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true "format" $format "outputFormat" $outputFormat) | plainify }}">
|
||||
|
||||
{{- with or .Description .Summary site.Params.Description | plainify }}
|
||||
{{- with or .Description .Summary | plainify }}
|
||||
<meta property="og:description" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<meta itemprop="name" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
{{- with or .Description .Summary site.Params.Description }}
|
||||
{{- with or .Description .Summary }}
|
||||
<meta itemprop="description" content="{{ . }}">
|
||||
{{- end }}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
{{- $numn := add $num $.count }}
|
||||
{{ (printf "<h%d>" $numn)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</h%d>" $numn)|safeHTML }}
|
||||
{{- if $.description }}
|
||||
{{- with or .Description .Summary site.Params.Description -}}
|
||||
{{- with or .Description .Summary -}}
|
||||
<p>{{ . }}</p>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -45,7 +45,7 @@
|
|||
{{- else if eq $.style "li" }}
|
||||
{{ (printf "<%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}
|
||||
{{- if $.description }}
|
||||
{{- with or .Description .Summary site.Params.Description -}}
|
||||
{{- with or .Description .Summary -}}
|
||||
<p>{{ . }}</p>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -53,7 +53,7 @@
|
|||
{{- else }}
|
||||
{{ (printf "<%s>" $.style)|safeHTML }}{{ if .RelPermalink }}<a href="{{ partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}">{{ .Title }}</a>{{ else }}<span>{{ .Title }}</span>{{ end }}{{ (printf "</%s>" $.style)|safeHTML }}
|
||||
{{- if $.description }}
|
||||
{{- with or .Description .Summary site.Params.Description -}}
|
||||
{{- with or .Description .Summary -}}
|
||||
<p>{{ . }}</p>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="twitter:card" content="summary">
|
||||
{{- end }}
|
||||
<meta name="twitter:title" content="{{ partial "pageHelper/title.hugo" (dict "page" . "fullyQualified" true "reverse" true) }}">
|
||||
<meta name="twitter:description" content="{{ with or .Description .Summary site.Params.Description }}{{ . }}{{ end }}">
|
||||
<meta name="twitter:description" content="{{ with or .Description .Summary }}{{ . }}{{ end }}">
|
||||
|
||||
{{- $twitterSite := "" }}
|
||||
{{- with site.Params.social }}
|
||||
|
|
Loading…
Reference in a new issue