Skip to content

Commit 210f83f

Browse files
committed
Add test for actions/upload-pages-artifact
See gohugoio/hugoDocs#3364
1 parent cfe9c8a commit 210f83f

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

content/tests/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ title: Tests
55
---
66

77
Here's a [broken link](foo) to test the custom 404 page.
8+
9+
Here'a a link to [/.well-known/foo.txt](/.well-known/foo.txt) to test `actions/upload-pages-artifact`.

hugo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,11 @@ enableGitInfo = true
5959

6060
[[module.imports]]
6161
path = 'github.com/jmooring/hugo-module-content'
62+
63+
[[module.mounts]]
64+
source = 'assets'
65+
target = 'assets'
66+
67+
[[module.mounts]]
68+
source = 'static'
69+
target = 'assets'

layouts/tests/webp/page.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ <h1>{{ .Title }}</h1>
55
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
66

77
{{ range resources.ByType "image" }}
8-
{{ with .Process "webp" }}
9-
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
8+
{{ if reflect.IsImageResource . }}
9+
{{ with .Process "webp" }}
10+
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
11+
{{ end }}
1012
{{ end }}
1113
{{ end }}
1214

0 commit comments

Comments
 (0)