You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The minimum Hugo version required by the Relearn theme is 0.126.0.
15
+
- The current Ubuntu `snap` (which provides 0.142.0) also works.
26
16
27
17
## Installation
28
18
29
-
- Install Hugo; follow the guidance on https://gohugo.io/getting-started/installing.
30
-
You'll need to install Go as well: see https://go.dev/
31
-
- Hugo installation is described at https://gohugo.io/installation
32
-
- On Ubuntu 24.04, the version installed by `apt` works.
33
-
- On Ubuntu 22.04 and older:
34
-
-`apt-get install hugo` would install a version that is too old.
35
-
-`sudo snap install hugo` installs a too recent version
19
+
- Install Hugo 0.126 or newer (required by the Hugo Relearn theme)
20
+
follow the guidance on <https://gohugo.io/installing>.
21
+
You'll need to install Go as well: see <https://go.dev/>
22
+
- On Ubuntu, use the `snap` package:
23
+
-`sudo snap install hugo` installs the current version
24
+
`apt-get install hugo` would install a version that is too old,
25
+
(this applies up to Ubuntu 24.04)
36
26
37
27
- To install Hugo from source, you need a recent `golang-1.2x` compiler:
38
28
- On Ubuntu 22.04, this can be done with:
29
+
39
30
```bash
40
31
sudo apt install golang-1.23-go
41
32
# Add it to your path, assuming your .local/bin/ is early in your PATH:
@@ -47,13 +38,65 @@ Hugo Relearn >= 5.24.0 and < 6.x are expected to work:
47
38
## Development
48
39
49
40
- Run a local server: `hugo server`
50
-
- Open a browser at http://127.0.0.1:1313/new-docs/
41
+
- Open a browser at <http://127.0.0.1:1313/new-docs/>
51
42
- Add content to `doc/content/`:
52
43
- Documents are written in Markdown.
53
-
- Please wrap lines in paragraphs to make review and diffs easier to read.
54
-
- The menu hierarchy comes mostly from the directory structure in`content/`.
44
+
- Please wrap lines in paragraphs to make reviews more manageable.
45
+
- The menu hierarchy comes mainly from the directory structure in`content/`.
55
46
- A file called `_index.md` is needed in a directory to define a new level in the menu.
56
-
- To set the page title which is also used for the main menu,
47
+
- To set the page title,
57
48
[use the front matter](https://gohugo.io/content-management/front-matter/).
58
-
- For a page that has images or other stuff included, it is best to create a new directory. Put the contents in a `index.md` file (no `_`) and the related files next to it. See https://gohugo.io/content-management/organization/ for more information.
59
-
- Look at https://mcshelby.github.io/hugo-theme-relearn/ for more information about what the Relearn theme offers, including some handy "shortcodes".
49
+
- For a page that has images or other stuff included, it is best to create a new directory:
50
+
Put the contents in an `index.md` file (no `_`) and the related files next to it.
51
+
See <https://gohugo.io/content-management/organization/>for more information.
52
+
53
+
See <https://mcshelby.github.io/hugo-theme-relearn/>for more information about
54
+
the features of the Relearn theme, including handy "shortcodes".
55
+
56
+
Note: When switching versions, before re-generating the documentation using
57
+
`hugo server`, delete the previously generated static site using `rm -r docs/public`.
58
+
59
+
### Notes for supporting current versions of Hugo and the Relearn theme
60
+
61
+
Backported fixes to support newer Hugo versions:
62
+
63
+
- `layouts/partials/header.html`, it fixes:
64
+
```js
65
+
ERROR deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in Hugo 0.143.0. Use .Sites.Default instead.
66
+
```
67
+
- `layouts/partials/menu.html`, it fixes:
68
+
```js
69
+
ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.143.0. Use hugo.IsMultilingual instead.
70
+
```
71
+
72
+
The fixes for those issues were backported from the Hugo Relearn v7.x.x theme.
73
+
When updating to Hugo Relearn 7.x.x, please remove them (if possible).
74
+
75
+
#### Upgrading to the Hugo Relearn 7.x.x theme versions
76
+
77
+
The partials in`layouts/partials` contain code for rendering the XenAPI releases
78
+
and class reference:
79
+
80
+
These custom partials need updates to support the breaking changes of Hugo Relearn
81
+
7.0.0. Otherwise, the Relearn theme menu sidebar on those pages would be missing.
82
+
These are the pages to verify for correct menu rendering when updating to 7.x.x:
0 commit comments