aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorJoe Mooring <[email protected]>2024-03-23 16:34:39 -0700
committerBjørn Erik Pedersen <[email protected]>2024-03-28 14:56:02 +0100
commit74ce5dc84136467b563be6efa4246d29ad6127f7 (patch)
tree8b2c15f22f3bd740877e1c34a4a0f0114659c1af /hugolib
parent54a8f0ce21015df7f9927dca358b6d09a560e37b (diff)
downloadhugo-74ce5dc84136467b563be6efa4246d29ad6127f7.tar.gz
hugo-74ce5dc84136467b563be6efa4246d29ad6127f7.zip
tpl/tplimpl: Update schema template
Changes: - Remove trailing comma from list of keywords. - Improve keywords precedence: 1. Use "keywords" term page titles. 2. Use "keywords" from front matter if "keywords" is not a taxonomy. 3. Use "tags" term page titles. 4. Use term page titles from all taxonomies. - Enable schema for all page kinds, previously limited to kind = page. - Remove trailing slashes from void elements. - Improve readability. Closes #7570 Co-authored by: 0urobor0s <[email protected]>
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/embedded_templates_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/hugolib/embedded_templates_test.go b/hugolib/embedded_templates_test.go
index c409b0fbd..5ef92597c 100644
--- a/hugolib/embedded_templates_test.go
+++ b/hugolib/embedded_templates_test.go
@@ -68,9 +68,9 @@ title: My Site
<meta property="article:published_time" content="2021-02-26T18:02:00-01:00" />
<meta property="article:modified_time" content="2021-05-22T19:25:00-01:00" />
<meta itemprop="name" content="My Bundle">
-<meta itemprop="image" content="https://example.org/mybundle/featured-sunset.jpg" />
-<meta itemprop="datePublished" content="2021-02-26T18:02:00-01:00" />
-<meta itemprop="dateModified" content="2021-05-22T19:25:00-01:00" />
+<meta itemprop="image" content="https://example.org/mybundle/featured-sunset.jpg">
+<meta itemprop="datePublished" content="2021-02-26T18:02:00-01:00">
+<meta itemprop="dateModified" content="2021-05-22T19:25:00-01:00">
`)
b.AssertFileContent("public/mypage/index.html", `
@@ -81,17 +81,17 @@ title: My Site
<meta property="og:image" content="https://example.org/mypage/sample.jpg" />
<meta property="article:published_time" content="2021-02-26T18:02:00+01:00" />
<meta property="article:modified_time" content="2021-05-22T19:25:00+01:00" />
-<meta itemprop="image" content="https://example.org/pageimg1.jpg" />
-<meta itemprop="image" content="https://example.org/pageimg2.jpg" />
-<meta itemprop="image" content="https://example.local/logo.png" />
-<meta itemprop="image" content="https://example.org/mypage/sample.jpg" />
-<meta itemprop="datePublished" content="2021-02-26T18:02:00+01:00" />
-<meta itemprop="dateModified" content="2021-05-22T19:25:00+01:00" />
+<meta itemprop="image" content="https://example.org/pageimg1.jpg">
+<meta itemprop="image" content="https://example.org/pageimg2.jpg">
+<meta itemprop="image" content="https://example.local/logo.png">
+<meta itemprop="image" content="https://example.org/mypage/sample.jpg">
+<meta itemprop="datePublished" content="2021-02-26T18:02:00+01:00">
+<meta itemprop="dateModified" content="2021-05-22T19:25:00+01:00">
`)
b.AssertFileContent("public/mysite/index.html", `
<meta name="twitter:image" content="https://example.org/siteimg1.jpg" />
<meta property="og:image" content="https://example.org/siteimg1.jpg" />
-<meta itemprop="image" content="https://example.org/siteimg1.jpg" />
+<meta itemprop="image" content="https://example.org/siteimg1.jpg">
`)
}