Skip to content

Commit 2b148b8

Browse files
committed
content: add explicit redirects for "ugly" URLs of list files
As of v0.148.0, Hugo no longer generates `<base>.html` files for `<base>/_index.html` files; For full details, see https://discourse.gohugo.io/t/breaking-changes-in-v0-148-0/55257. That means that e.g. `book.html` is now missing, and only `book/index.html` is present (but we want both so that either https://git-scm.com/book or https://git-scm.com/book/ are fine). Therefore, we need to add explicit aliases to get those `<base>.html` files back after upgrading to Hugo v0.148.0. Note that this commit includes changes to the (generated) `book/` files. This is intentional; The next commit will adjust the script that generates those files. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent e9be74a commit 2b148b8

File tree

34 files changed

+71
-0
lines changed

34 files changed

+71
-0
lines changed

content/blog/_index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
section: "blog"
44
layout: "default"
55
sidebar: "blog"
6+
url: /blog.html
7+
aliases:
8+
- /blog/index.html
69
---
710

811
<div id="main" class="blog">

content/downloads/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
url: /downloads.html
55
aliases:
66
- /downloads/index.html
7+
- /download/index.html
8+
- /download.html
79
---
810

911
<div id="main">

content/downloads/guis/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
- /downloads/guis/index.html
88
- /download/guis/index.html
99
- /download/guis.html
10+
- /download/gui/index.html
11+
- /download/gui.html
1012
---
1113

1214
<div id="main">

content/videos/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
url: /videos.html
66
aliases:
77
- /videos/index.html
8+
- /video/index.html
9+
- /video.html
810
---
911

1012
<div id='main'>

external/book/content/book/az/v2/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
aliases:
1717
- "/book/az/v2/index.html"
1818
- "/book/az/v1/index.html"
19+
- "/book/az/v1.html"
1920
- "/book/az/index.html"
21+
- "/book/az.html"
2022
---

external/book/content/book/be/v2/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
aliases:
1717
- "/book/be/v2/index.html"
1818
- "/book/be/v1/index.html"
19+
- "/book/be/v1.html"
1920
- "/book/be/index.html"
21+
- "/book/be.html"
2022
---

external/book/content/book/bg/v2/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
aliases:
1818
- "/book/bg/v2/index.html"
1919
- "/book/bg/v1/index.html"
20+
- "/book/bg/v1.html"
2021
- "/book/bg/index.html"
22+
- "/book/bg.html"
2123
---

external/book/content/book/cs/v2/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
aliases:
1515
- "/book/cs/v2/index.html"
1616
- "/book/cs/v1/index.html"
17+
- "/book/cs/v1.html"
1718
- "/book/cs/index.html"
19+
- "/book/cs.html"
1820
---

external/book/content/book/de/v2/_index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
aliases:
1717
- "/book/de/v2/index.html"
1818
- "/book/de/v1/index.html"
19+
- "/book/de/v1.html"
1920
- "/book/de/index.html"
21+
- "/book/de.html"
2022
---

external/book/content/book/en/v2/_index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
aliases:
1717
- "/book/en/v2/index.html"
1818
- "/book/en/v1/index.html"
19+
- "/book/en/v1.html"
1920
- "/book/en/index.html"
21+
- "/book/en.html"
2022
- "/book/index.html"
23+
- "/book.html"
2124
- "/book/v1/index.html"
25+
- "/book/v1.html"
2226
---

0 commit comments

Comments
 (0)