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
Copy file name to clipboardExpand all lines: _learn/03-hugo-go-netlify.md
+29-34Lines changed: 29 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ For a Hugo static site, you can choose your specific theme after you create the
65
65
title = "Learning Hugo Site"
66
66
[module]
67
67
[[module.imports]]
68
-
path = 'github.com/McShelby/hugo-theme-relearn'
68
+
path = 'github.com/McShelby/hugo-theme-relearn'
69
69
```
70
70
1. To get the theme files in the `/themes` directory, and keep them updated, use a `git submodules` command to get the required theme files as well as keep them updated.
71
71
```
@@ -75,11 +75,11 @@ For a Hugo static site, you can choose your specific theme after you create the
75
75
```
76
76
go: creating new go.mod: module example.com
77
77
go: to add module requirements and sums:
78
-
go mod tidy
78
+
go mod tidy
79
79
```
80
80
Next, add the theme as a Git submodule with this command:
1. For Hugo, the `content` folder contains the site source content. For your home page, make an `_index.md` document in the `content` folder and write it with Markdown content. Switch back up one level since you just cloned the theme files.
85
85
```
@@ -112,24 +112,30 @@ For Hugo, it's important to know that draft pages, where `draft = true` is in th
112
112
```
113
113
$ hugo server
114
114
115
-
| EN
116
-
+------------------+----+
117
-
Pages | 12
118
-
Paginator pages | 0
119
-
Non-page files | 0
120
-
Static files | 67
121
-
Processed images | 0
122
-
Aliases | 0
123
-
Sitemaps | 1
124
-
Cleaned | 0
125
-
126
-
Total in 48 ms
127
-
Watching for changes in /Users/agentle/src/hugo-example/doc-machine/{content,data,layouts,static,themes}
128
-
Watching for config changes in /Users/agentle/src/hugo-example/doc-machine/config.toml
129
-
Serving pages from memory
130
-
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
131
-
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
132
-
Press Ctrl+C to stop
115
+
Watching for changes in /Users/agentle/src/hugo-learn/{archetypes,assets,content,data,i18n,layouts,static,themes}
116
+
Watching for config changes in /Users/agentle/src/hugo-learn/hugo.toml, /Users/agentle/src/hugo-learn/themes/hugo-theme-relearn/hugo.toml, /Users/agentle/src/hugo-learn/go.mod
117
+
Start building sites …
118
+
hugo v0.135.0+extended darwin/amd64 BuildDate=2024-09-27T13:17:08Z VendorInfo=brew
119
+
120
+
WARN deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
121
+
WARN deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in a future release. Use hugo.IsMultilingual instead.
122
+
123
+
| EN
124
+
-------------------+------
125
+
Pages | 11
126
+
Paginator pages | 0
127
+
Non-page files | 0
128
+
Static files | 182
129
+
Processed images | 0
130
+
Aliases | 0
131
+
Cleaned | 0
132
+
133
+
Built in 276 ms
134
+
Environment: "development"
135
+
Serving pages from disk
136
+
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
137
+
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
138
+
Press Ctrl+C to stop
133
139
```
134
140
2. Open the **Web Server** URL, `http://localhost:1313/` in your local browser to view the site.
135
141

@@ -138,18 +144,7 @@ For Hugo, it's important to know that draft pages, where `draft = true` is in th
138
144
139
145
## Modify the Hugo theme
140
146
141
-
By default, the Hugo Theme "Learn" has a purple sidebar. How about changing the color and logo displayed in the sidebar? Here's how. While we're at it, let's make sure to configure the search tool that works best with this theme.
142
-
143
-
1. Edit the `config.toml` file and add these lines to the `config.toml` file. This example shows setting the `themeVariant` to `green`.
144
-
```
145
-
[params]
146
-
themeVariant = "green"
147
-
```
148
-
1. You can make sure that the theme works with the `lunr.js`[JavaScript search engine](https://lunrjs.com/) by adding these lines to the `config.toml` file.
149
-
```
150
-
[outputs]
151
-
home = [ "HTML", "RSS", "JSON"]
152
-
```
147
+
The Hugo Theme "Relearn" has many ways to [customize the theme](https://mcshelby.github.io/hugo-theme-relearn/basics/customization/index.html), including activating print support and a dedicated search page. Refer to the [Relearn theme documentation](https://mcshelby.github.io/hugo-theme-relearn/) for details.
153
148
154
149
## What's next
155
150
@@ -165,5 +160,5 @@ home = [ "HTML", "RSS", "JSON"]
0 commit comments