Commit 782404f
authored
Hugo docsy upgrade (#2771)
* Upgrade Hugo to 0.164.0 and Docsy to 0.16.0
The repo was pinned to Hugo 0.148.2 and Docsy 0.10.0, six Docsy minor
releases behind. Docsy 0.16.0 requires Hugo 0.160.1 or later and is
validated against 0.164.0, so both move together.
Docsy 0.16.0 breaking changes:
- The theme moved into theme/, so the module import path becomes
github.com/google/docsy/theme.
- Bootstrap and Font Awesome are npm dependencies rather than Hugo
modules, so github.com/google/docsy/dependencies is dropped and
`hugo mod npm pack` generates packages/hugoautogen/. Re-run it, then
`npm install`, whenever Docsy is updated.
- PostCSS is opt-in for sites with no RTL language and no PostCSS config
of their own, so autoprefixer, postcss, and postcss-cli are removed.
- Docsy no longer ships default favicon artwork. Six of the ten icons the
site linked came from Docsy, not this repository; the new default
partial only discovers icons in static/, while ours live in
static/favicons/. layouts/_partials/favicons.html keeps every existing
icon URL and uses Selenium's own pwa-*.png in place of Docsy's.
Hugo changes between 0.148.2 and 0.164.0:
- Language config and template APIs were renamed in 0.158.0:
languageName -> label, .Language.Lang -> .Language.Name,
.Language.LanguageName -> .Language.Label.
- .Site.Data was deprecated in 0.156.0 in favour of hugo.Data.
- The gist and twitter/tweet shortcodes were removed in 0.156.0. tweet is
replaced by the built-in x shortcode; gist is replaced by a local
shortcode reproducing Hugo's removed template.
- text/html content files are denied by default from 0.162.0, so
security.allowContent explicitly allows the .html landing pages this
site publishes.
- The global imaging.quality setting was deprecated in 0.163.0. It was
set to 75, already Hugo's default, so removing it changes no output.
- .Render now fails the build on a missing view template instead of
rendering nothing, which surfaced meetings/single.html calling the
Docsy content view by its pre-0.16 name.
Alias handling (Hugo 0.155.0, gohugoio/hugo#14388):
Aliases on a page in a non-default language are now published relative to
that language's site root rather than the publish root, because languages
previously clobbered each other's aliases. Both alias styles in this repo
had to move, and all 508 affected URLs still publish at their current
paths:
- 260 aliases already carrying their own language prefix would have been
published twice-prefixed (/ja/ja/...). The prefix is now dropped from
front matter and Hugo adds it.
- 248 legacy /documentation/<lang>/... aliases predate the 2021
restructure and sit at the site root, which is the English namespace.
A translated page can no longer publish there, so they move to the
English counterpart. The URLs keep working; they now resolve to the
English page rather than the translated one.
Verified against a 0.148.2 baseline build: llms.txt is byte-identical,
tab rendering is unchanged, canonical and hreflang links are intact, and
no non-print URL is lost. The 224 remaining differences are noindex
meta-refresh stubs of print-format aliases, which Hugo no longer renders
for unrendered pages.
* Remove translated pages whose legacy URLs now resolve to English
The previous commit moved 248 legacy /documentation/<lang>/... aliases
onto their English counterparts, because Hugo 0.155.0 no longer lets a
translated page publish an alias at the site root. Those URLs kept
working but started resolving to the English page rather than the
translated one.
Rather than keep translated pages that the legacy URLs no longer reach,
this removes them and redirects every URL they published:
- 209 translated pages deleted (70 ja, 69 pt-br, 70 zh-cn), leaving
roughly 54 translated documentation pages per language.
- 426 URLs preserved as aliases on the English counterparts, covering
each deleted page's own permalink and every alias it carried, so
nothing 404s. Permalinks were taken from `hugo list all` rather than
derived from file paths.
- 97 `ref` shortcodes in the 51 surviving translated pages pointed at
deleted pages. Hugo resolves refs within the current language, so they
now pass lang="en" and resolve against the English page, matching where
those URLs redirect. Only the file and line positions Hugo reported are
changed, so refs to translated pages that still exist are untouched.
Verified by diffing the built output against the pre-deletion build:
every URL still resolves except
/ja/documentation/webdriver/ja/documentation/webdriver/browser/, a
doubled path produced by an alias that was missing its leading slash. The
URL it was meant to create, /ja/documentation/webdriver/browser/, did not
exist before this change either. The other 48 differences are noindex
print-format copies of the deleted pages.
---------
[deploy site]1 parent 241e506 commit 782404f
388 files changed
Lines changed: 1081 additions & 35039 deletions
File tree
- .github/workflows
- website_and_docs
- assets/scss
- content
- blog
- 2020
- 2021
- documentation
- about
- grid
- advanced_features
- configuration
- legacy
- selenium_2
- selenium_3
- selenium_ide
- overview
- test_practices
- discouraged
- encouraged
- webdriver
- actions_api
- bidi
- w3c
- browsers
- drivers
- elements
- getting_started
- interactions
- support_features
- troubleshooting
- errors
- layouts
- _partials
- blog
- docs
- meetings
- partials
- hooks
- shortcodes
- sponsors
- packages/hugoautogen
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
| 13 | + | |
5 | 14 | | |
6 | 15 | | |
7 | 16 | | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| 20 | + | |
11 | 21 | | |
12 | 22 | | |
13 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
0 commit comments