mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-01 22:42:45 +02:00
Fix stray end p tag in Obsidian callout titles
Also remove test references to deprecated funcs now in ERROR. Closes #12828
This commit is contained in:
@@ -523,7 +523,7 @@ categories: ["cool stuff"]
|
||||
for _, p := range s.Pages() {
|
||||
checkDated(p, p.Kind())
|
||||
}
|
||||
checkDate(s.LastChange(), "site")
|
||||
checkDate(s.Lastmod(), "site")
|
||||
}
|
||||
|
||||
func TestPageDatesSections(t *testing.T) {
|
||||
|
@@ -185,35 +185,6 @@ urls="none"
|
||||
[security.http]
|
||||
mediaTypes=["application/json"]
|
||||
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
c.Run("getJSON, OK", func(c *qt.C) {
|
||||
c.Parallel()
|
||||
httpTestVariant(c, `{{ $json := getJSON "%[1]s/fruits.json" }}{{ $json.Content }}`, "", nil)
|
||||
})
|
||||
|
||||
c.Run("getJSON, denied URL", func(c *qt.C) {
|
||||
c.Parallel()
|
||||
httpTestVariant(c, `{{ $json := getJSON "%[1]s/fruits.json" }}{{ $json.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`,
|
||||
func(b *sitesBuilder) {
|
||||
b.WithConfigFile("toml", `
|
||||
[security]
|
||||
[security.http]
|
||||
urls="none"
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
||||
c.Run("getCSV, denied URL", func(c *qt.C) {
|
||||
c.Parallel()
|
||||
httpTestVariant(c, `{{ $d := getCSV ";" "%[1]s/cities.csv" }}{{ $d.Content }}`, `(?s).*is not whitelisted in policy "security\.http\.urls".*`,
|
||||
func(b *sitesBuilder) {
|
||||
b.WithConfigFile("toml", `
|
||||
[security]
|
||||
[security.http]
|
||||
urls="none"
|
||||
`)
|
||||
})
|
||||
})
|
||||
|
@@ -121,11 +121,10 @@ date: 2023-04-01
|
||||
---
|
||||
-- layouts/index.html --
|
||||
site.Lastmod: {{ .Site.Lastmod.Format "2006-01-02" }}
|
||||
site.LastChange: {{ .Site.LastChange.Format "2006-01-02" }}
|
||||
home.Lastmod: {{ site.Home.Lastmod.Format "2006-01-02" }}
|
||||
|
||||
`
|
||||
b := Test(t, files)
|
||||
|
||||
b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nsite.LastChange: 2023-04-01\nhome.Lastmod: 2023-01-01")
|
||||
b.AssertFileContent("public/index.html", "site.Lastmod: 2023-04-01\nhome.Lastmod: 2023-01-01")
|
||||
}
|
||||
|
@@ -147,8 +147,8 @@ func TestLastChange(t *testing.T) {
|
||||
|
||||
s := buildSingleSite(t, deps.DepsCfg{Fs: fs, Configs: configs}, BuildCfg{SkipRender: true})
|
||||
|
||||
c.Assert(s.LastChange().IsZero(), qt.Equals, false)
|
||||
c.Assert(s.LastChange().Year(), qt.Equals, 2017)
|
||||
c.Assert(s.Lastmod().IsZero(), qt.Equals, false)
|
||||
c.Assert(s.Lastmod().Year(), qt.Equals, 2017)
|
||||
}
|
||||
|
||||
// Issue #_index
|
||||
|
Reference in New Issue
Block a user