Skip to content

Commit f5dedca

Browse files
committed
book: take care of re-generating the "ugly" aliases
The preceding commit adapted the `_index.html` files so that even after Hugo v0.148.0 aliases such as `/book.html` are generated. That commit included the necessary changes also for the (generated) `external/book/` files. Let's also adjust the script so that these explicit aliases will keep getting re-generated. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 0b0fb34 commit f5dedca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

script/book.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,15 @@ def save
134134
front_matter["aliases"] = [
135135
"/book/#{@language_code}/v#{@edition}/index.html",
136136
"/book/#{@language_code}/v1/index.html",
137-
"/book/#{@language_code}/index.html"
137+
"/book/#{@language_code}/v1.html",
138+
"/book/#{@language_code}/index.html",
139+
"/book/#{@language_code}.html"
138140
]
139141
if @language_code == "en"
140142
front_matter["aliases"].push("/book/index.html")
143+
front_matter["aliases"].push("/book.html")
141144
front_matter["aliases"].push("/book/v1/index.html")
145+
front_matter["aliases"].push("/book/v1.html")
142146
end
143147
front_matter["book"]["front_page"] = true
144148
front_matter["book"]["repository_url"] = "https://github.com/#{@@all_books[@language_code]}"

0 commit comments

Comments
 (0)