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: content/docs/hugo.md
+40
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,46 @@ collections:
106
106
107
107
**Note:** You won't be able to access the CMS just yet — you still need to deploy the project with **Netlify** and authenticate with **Netlify Identity**. You'll handle this in the next few steps of this guide.
108
108
109
+
### Configuring Netlify Build Settings
110
+
111
+
To ensure consistent builds on Netlify, create a `netlify.toml` configuration file at your project's root with these settings:
112
+
113
+
```toml
114
+
[build]
115
+
command = "hugo"
116
+
publish = "public"
117
+
118
+
[context.production.environment]
119
+
HUGO_VERSION = "0.128.0"
120
+
```
121
+
122
+
This configuration:
123
+
124
+
1. Specifies the exact Hugo version Netlify should use (match this to your local Hugo version)
125
+
2. Defines the build command that generates your site
126
+
3. Sets the publish directory to Hugo's default output folder
127
+
128
+
**Note:** Explicitly setting the Hugo version prevents unexpected build issues from version mismatches between your local environment and Netlify's auto-detected version.
129
+
130
+
### Configuring Netlify Build Settings
131
+
To ensure consistent builds on Netlify, create a `netlify.toml` configuration file at your project's root with these settings:
132
+
133
+
```toml
134
+
[build]
135
+
command = "hugo"
136
+
publish = "public"
137
+
[context.production.environment]
138
+
HUGO_VERSION = "0.128.0"
139
+
```
140
+
141
+
This configuration:
142
+
143
+
1. Specifies the exact Hugo version Netlify should use (match this to your local Hugo version)
144
+
2. Defines the build command that generates your site
145
+
3. Sets the publish directory to Hugo's default output folder
146
+
147
+
**Note:** Explicitly setting the Hugo version prevents unexpected build issues from version mismatches between your local environment and Netlify's auto-detected version.
148
+
109
149
### Pushing to GitHub
110
150
111
151
It's now time to commit your changes and push to GitHub. You can run the following commands to initialize a git repository and push the changes so far.
0 commit comments