Skip to content

Commit

Permalink
Add test case for gohugoio/hugo#5882
Browse files Browse the repository at this point in the history
  • Loading branch information
regisphilibert committed Apr 20, 2019
1 parent a6e3b13 commit da71bb1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/bundle/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Bundle
---

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
4 changes: 4 additions & 0 deletions content/bundle/resource-page-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Resource Page 1
---
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
18 changes: 18 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
{{ define "main" }}
Single {{ .Title }}

{{ with .Resources.ByType "page" }}
It's a bundle with page Resource
{{ printf "%#v" . }}
<ul>
{{ range . }}
<li>
{{ $title := .Title }}
{{ with .Permalink }}
<a href="{{ . }}">{{ $title }}</a>
{{ else }}
<span>{{ $title }}</span>
{{ end }}
</li>
{{ end }}
</ul>
{{ end }}

{{ end }}

0 comments on commit da71bb1

Please sign in to comment.