Skip to content

Commit 1c9b20b

Browse files
authored
Merge pull request #9681 from mendix/MvM-HugoBug
Work around Hugo Cascade bug
2 parents 4e8e14d + b2c1003 commit 1c9b20b

File tree

5 files changed

+16
-5
lines changed

5 files changed

+16
-5
lines changed

content/en/docs/howto10/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ cascade:
1111
- notsitemap: true
1212
- sitemap:
1313
priority: 0.7
14+
- banner: ""
15+
# Empty banner added to get around bug in Hugo 0.123.0 (https://github.com/gohugoio/hugo/issues/12465) which is not fixed until 0.143.0 (https://github.com/gohugoio/hugo/releases/tag/v0.143.0)
1416
#This document is mapped to the landing page, update the link there if renaming or moving the doc file.
1517
---
1618

content/en/docs/howto9/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ cascade:
1212
- notsitemap: true
1313
- sitemap:
1414
priority: 0.3
15+
- banner: ""
16+
# Empty banner added to get around bug in Hugo 0.123.0 (https://github.com/gohugoio/hugo/issues/12465) which is not fixed until 0.143.0 (https://github.com/gohugoio/hugo/releases/tag/v0.143.0)
1517
#This document is mapped to the landing page, update the link there if renaming or moving the doc file.
1618
---
1719

content/en/docs/refguide10/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ cascade:
1111
- notsitemap: true
1212
- sitemap:
1313
priority: 0.8
14+
- banner: ""
15+
# Empty banner added to get around bug in Hugo 0.123.0 (https://github.com/gohugoio/hugo/issues/12465) which is not fixed until 0.143.0 (https://github.com/gohugoio/hugo/releases/tag/v0.143.0)
1416
---
1517

1618
## Introduction

content/en/docs/refguide9/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ cascade:
1212
- notsitemap: true
1313
- sitemap:
1414
priority: 0.4
15+
- banner: ""
16+
# Empty banner added to get around bug in Hugo 0.123.0 (https://github.com/gohugoio/hugo/issues/12465) which is not fixed until 0.143.0 (https://github.com/gohugoio/hugo/releases/tag/v0.143.0)
1517
---
1618

1719
## Introduction

layouts/partials/version-banner.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
<!-- Check if the page has a banner: "string" set if yes, display a banner. -->
44
<!-- safeHTML means you can include HTML. If you need to escape double quotes, use \" -->
55
<!-- For example: banner: "Go <a href=\"/refguide9/moving-from-8-to-9/\">here</a>" -->
6-
{{ with .Params.banner}}
7-
<div class="pageinfo pageinfo-warning">
8-
<p>{{ . | safeHTML }}</p>
9-
</div>
10-
{{end}}
6+
<!-- Extra check for empty banner added to allow empty banners in front matter to get around bug in Hugo 0.123.0 (https://github.com/gohugoio/hugo/issues/12465) which is not fixed until 0.143.0 (https://github.com/gohugoio/hugo/releases/tag/v0.143.0) -->
7+
{{ with .Params.banner }}
8+
{{ if ne . "" }}
9+
<div class="pageinfo pageinfo-warning">
10+
<p>{{ . | safeHTML }}</p>
11+
</div>
12+
{{ end }}
13+
{{ end }}
1114

1215
<!-- If the page has draft: true set, display the following text as a banner. -->
1316
{{ with .Params.draft }}

0 commit comments

Comments
 (0)