testscripts: Move layouts file to new structure

This commit is contained in:
Bjørn Erik Pedersen
2025-11-27 20:41:56 +01:00
committed by GitHub
parent 5e649eb4d0
commit 45b67f6c18
28 changed files with 43 additions and 43 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ stderr 'ERROR deprecated: item was deprecated in Hugo'
-- hugo.toml --
baseURL = "https://example.com/"
disableKinds = ["taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
Deprecate:
{{ if eq hugo.Environment "info" }}
{{ debug.TestDeprecationInfo "item" "alternative" }}
+2 -2
View File
@@ -10,9 +10,9 @@ grep 'IsServer: false;IsProduction: true' public/index.html
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
Home|IsServer: {{ hugo.IsServer }};IsProduction: {{ hugo.IsProduction }}|
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}
-- content/p1.md --
---
@@ -10,9 +10,9 @@ body {
-- content/p1.md --
-- content/p2.md --
-- content/p3.md --
-- layouts/index.html --
-- layouts/home.html --
Home.
-- layouts/_default/single.html --
-- layouts/single.html --
{{ $css := resources.Get "css/styles.css" }}
{{ $css := $css | minify | fingerprint | resources.PostProcess }}
CSS: {{ $css.RelPermalink }}
+2 -2
View File
@@ -19,8 +19,8 @@ url: /p1/
---
url: /p1/
---
-- layouts/index.html --
-- layouts/home.html --
Home.
-- layouts/_default/single.html --
-- layouts/single.html --
Single.
@@ -6,7 +6,7 @@ hugo --printPathWarnings
disableKinds = ['page','rss','section','sitemap','taxonomy','term']
-- assets/foo.txt --
foo
-- layouts/index.html --
-- layouts/home.html --
A: {{ (resources.Get "foo.txt").RelPermalink }}
B: {{ (resources.GetMatch "foo.txt").RelPermalink }}
C: {{ (index (resources.Match "foo.txt") 0).RelPermalink }}
@@ -39,9 +39,9 @@ baseURL = "https://example.com/"
weight = 2
title = "French Title"
contentDir = "content/fr"
-- layouts/index.html --
-- layouts/home.html --
Home.
-- layouts/_default/single.html --
-- layouts/single.html --
Single.
{{ range .Resources }}
{{ $img := .Resize "3x" }}
@@ -9,8 +9,8 @@ stdout 'Non-page files.*/| 2\s'
-- content/posts/post-1/index.md --
-- hugo.toml --
baseURL = "https://example.com/"
-- layouts/_default/list.html --
-- layouts/list.html --
List.
-- layouts/_default/single.html --
-- layouts/single.html --
Single.
@@ -8,5 +8,5 @@ grep 'Home' newpublic/index.html
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
publishDir = "newpublic"
-- layouts/index.html --
-- layouts/home.html --
Home.
+2 -2
View File
@@ -18,9 +18,9 @@ stop
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
Home.
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}| {{ .Content }}
-- content/p1.md --
---
+2 -2
View File
@@ -10,9 +10,9 @@ grep 'IsServer: false;IsProduction: true' public/index.html
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
Home|IsServer: {{ hugo.IsServer }};IsProduction: {{ hugo.IsProduction }}|
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}
-- content/p1.md --
---
+2 -2
View File
@@ -7,9 +7,9 @@ grep 'myparam: dev§' public/index.html
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
myparam: {{ site.Params.myparam }}§
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}
-- config/development/params.toml --
myparam = "dev"
@@ -10,9 +10,9 @@ grep 'myparam: §' public/index.html
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
myparam: {{ site.Params.myparam }}§
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}
-- config/development/params.toml --
myparam = "dev"
+2 -2
View File
@@ -6,9 +6,9 @@ grep 'myparam: §' public/index.html
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
myparam: {{ site.Params.myparam }}§
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}
-- config/development/params.toml --
myparam = "dev"
@@ -5,9 +5,9 @@ stderr 'Duplicate target paths: .index.html \(2\)'
-- hugo.toml --
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "404", "section"]
baseURL = "https://example.org/"
-- layouts/_default/single.html --
-- layouts/single.html --
Single.
-- layouts/index.html --
-- layouts/home.html --
Home.
-- content/p1.md --
---
@@ -5,7 +5,7 @@ stderr 'Template /list.html is unused'
-- hugo.toml --
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT", "404", "section", "page"]
baseURL = "https://example.org/"
-- layouts/index.html --
-- layouts/home.html --
Home.
-- layouts/_default/list.html --
-- layouts/list.html --
{{ errorf "unused template: %s" .Kind }}
+1 -1
View File
@@ -23,7 +23,7 @@ disableKinds = ["taxonomy", "term", "sitemap"]
myenv = "theproduction"
-- config/development/params.toml --
myenv = "thedevelopment"
-- layouts/index.html --
-- layouts/home.html --
<!DOCTYPE html>
<body>
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|ServerPort: {{ site.ServerPort }}|myenv: {{ .Site.Params.myenv }}|Env: {{ hugo.Environment }}|IsServer: {{ hugo.IsServer }}|
+1 -1
View File
@@ -37,7 +37,7 @@ languageName = "Nynorsk"
title = "Hugo Nynorsk Server Test"
weight = 2
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ .Permalink }}|
@@ -32,9 +32,9 @@ stopServer
title = "Hugo Server Test"
baseURL = "https://example.org/"
disableKinds = ["taxonomy", "term", "sitemap"]
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- content/_index.md --
---
@@ -19,9 +19,9 @@ stopServer
title = "Hugo Server Test"
baseURL = "https://example.org/"
disableKinds = ["taxonomy", "term", "sitemap"]
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- content/_index.md --
---
@@ -19,9 +19,9 @@ stopServer
title = "Hugo Server Test"
baseURL = "https://example.org/"
disableKinds = ["taxonomy", "term", "sitemap"]
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- layouts/_default/single.html --
-- layouts/single.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- content/_index.md --
---
+1 -1
View File
@@ -41,7 +41,7 @@ baseURL = "https://fr.example.org/"
title = "Hugo Serveur Test"
languageName = "Français"
weight = 2
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
-- static/en/mystatic/mytext.txt --
en_mytext
@@ -14,5 +14,5 @@ disableKinds = ["taxonomy", "term", "sitemap"]
[[module.mounts]]
source = "hugo_stats.json"
target = "assets/watching/hugo_stats.json"
-- layouts/index.html --
-- layouts/home.html --
<body>Home</body>
@@ -12,7 +12,7 @@ title = "Hugo Server Test"
baseURL = "https://example.org/"
disableKinds = ["section", "page", "taxonomy", "term", "RSS", "sitemap", "robotsTXT", "404"]
theme = "mytheme"
-- layouts/index.html --
-- layouts/home.html --
foo: {{ .Site.Params.foo }}
-- themes/mytheme/hugo.toml --
[params]
@@ -10,7 +10,7 @@ stopServer
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
<html>
<head>
</head>
@@ -11,7 +11,7 @@ stopServer
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
disableLiveReload = true
-- layouts/index.html --
-- layouts/home.html --
<html>
<head>
</head>
@@ -44,7 +44,7 @@ weight = 2
This is a static file in English.
-- static/en/mystatic.txt --
This is a static file in English.
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
@@ -20,7 +20,7 @@ baseURL = "https://example.org/"
disableKinds = ["taxonomy", "term", "sitemap"]
-- static/mystatic.txt --
This is a static file.
-- layouts/index.html --
-- layouts/home.html --
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
+1 -1
View File
@@ -7,7 +7,7 @@ stderr 'warning'
-- hugo.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "page", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
-- layouts/index.html --
-- layouts/home.html --
Home
{{ warnf "This is a warning" }}