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
Depending on your environment you may need to adjust the top-level `module` settings in your project's Hugo config file, for example, by adding a proxy to use when downloading remote modules.
41
-
You can find details of what these configuration settings do in the [Hugo modules documentation](https://gohugo.io/hugo-modules/configuration/#module-config-top-level).
46
+
Depending on your environment you may need to adjust the top-level `module`
47
+
settings in your project's Hugo config file, for example, by adding a proxy to
48
+
use when downloading remote modules. You can find details of what these
Once you've made your working copy of the site repo, from the repo root folder, run:
70
+
Once you've made your working copy of the site repo, from the repo root folder,
71
+
run:
58
72
59
73
```bash
60
74
hugo server
61
75
```
62
76
63
77
## Running a container locally
64
78
65
-
You can run docsy-example inside a [Docker](https://docs.docker.com/)
66
-
container, the container runs with a volume bound to the `docsy-example`
67
-
folder. This approach doesn't require you to install any dependencies other
68
-
than [Docker Desktop](https://www.docker.com/products/docker-desktop) on
69
-
Windows and Mac, and [Docker Compose](https://docs.docker.com/compose/install/)
70
-
on Linux.
79
+
You can run docsy-example inside a [Docker](https://docs.docker.com/) container,
80
+
the container runs with a volume bound to the `docsy-example` folder. This
81
+
approach doesn't require you to install any dependencies other than
82
+
[Docker Desktop](https://www.docker.com/products/docker-desktop) on Windows and
83
+
Mac, and [Docker Compose](https://docs.docker.com/compose/install/) on Linux.
71
84
72
85
1. Build the docker image
73
86
@@ -85,10 +98,10 @@ on Linux.
85
98
86
99
1. Verify that the service is working.
87
100
88
-
Open your web browser and type `http://localhost:1313` in your navigation bar,
89
-
This opens a local instance of the docsy-example homepage. You can now make
90
-
changes to the docsy example and those changes will immediately show up in your
91
-
browser after you save.
101
+
Open your web browser and type `http://localhost:1313` in your navigation
102
+
bar, This opens a local instance of the docsy-example homepage. You can now
103
+
make changes to the docsy example and those changes will immediately show up
104
+
in your browser after you save.
92
105
93
106
### Cleanup
94
107
@@ -99,13 +112,16 @@ To remove the produced images run:
99
112
```bash
100
113
docker-compose rm
101
114
```
115
+
102
116
For more information see the [Docker Compose documentation][].
103
117
104
118
## Using a local Docsy clone
105
119
106
120
Make sure your installed go version is `1.18` or higher.
107
121
108
-
Clone the latest version of the docsy theme into the parent folder of your project. The newly created repo should now reside in a sibling folder of your site's root folder.
122
+
Clone the latest version of the docsy theme into the parent folder of your
123
+
project. The newly created repo should now reside in a sibling folder of your
124
+
site's root folder.
109
125
110
126
```shell
111
127
cd root-of-your-site
@@ -124,16 +140,24 @@ or, when using npm, prepend `local` to the script you want to invoke, e.g.:
124
140
npm run local serve
125
141
```
126
142
127
-
By using the `HUGO_MODULE_WORKSPACE` directive (either directly or via prefix `local` when using npm), the server now watches all files and directories inside the sibling directory `../docsy` , too. Any changes inside the local `docsy` theme clone are now immediately picked up (hot reload), you can instantly see the effect of your local edits.
143
+
By using the `HUGO_MODULE_WORKSPACE` directive (either directly or via prefix
144
+
`local` when using npm), the server now watches all files and directories inside
145
+
the sibling directory `../docsy` , too. Any changes inside the local `docsy`
146
+
theme clone are now immediately picked up (hot reload), you can instantly see
147
+
the effect of your local edits.
128
148
129
-
In the command above, we used the environment variable `HUGO_MODULE_WORKSPACE` to tell hugo about the local workspace file `docsy.work`. Alternatively, you can declare the workspace file inside your settings file `hugo.toml`:
149
+
In the command above, we used the environment variable `HUGO_MODULE_WORKSPACE`
150
+
to tell hugo about the local workspace file `docsy.work`. Alternatively, you can
151
+
declare the workspace file inside your settings file `hugo.toml`:
130
152
131
153
```toml
132
154
[module]
133
155
workspace = "docsy.work"
134
156
```
135
157
136
-
Your project's `hugo.toml` file already contains these lines, the directive for workspace assignment is commented out, however. Remove the two trailing comment characters '//' so that this line takes effect.
158
+
Your project's `hugo.toml` file already contains these lines, the directive for
159
+
workspace assignment is commented out, however. Remove the two trailing comment
160
+
characters '//' so that this line takes effect.
137
161
138
162
## Troubleshooting
139
163
@@ -148,8 +172,10 @@ Error: Error building site: "C:\Users\foo\path\to\docsy-example\content\en\_inde
148
172
Built in 27 ms
149
173
```
150
174
151
-
This error occurs if you are running an outdated version of Hugo. As of docsy theme version `v0.12.0`, hugo version `0.146.0` or higher is required.
152
-
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-hugo) of the user guide for instructions on how to install Hugo.
175
+
This error occurs if you are running an outdated version of Hugo. As of docsy
176
+
theme version `v0.12.0`, hugo version `0.146.0` or higher is required. See this
of the user guide for instructions on how to install Hugo.
153
179
154
180
Or you may be confronted with the following error:
155
181
@@ -162,8 +188,10 @@ Built in 288 ms
162
188
Error: Error building site: TOCSS: failed to transform "scss/main.scss" (text/x-scss): resource "scss/scss/main.scss_9fadf33d895a46083cdd64396b57ef68" not found in file cache
163
189
```
164
190
165
-
This error occurs if you have not installed the extended version of Hugo.
166
-
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-hugo) of the user guide for instructions on how to install Hugo.
191
+
This error occurs if you have not installed the extended version of Hugo. See
of the user guide for instructions on how to install Hugo.
167
195
168
196
Or you may encounter the following error:
169
197
@@ -173,15 +201,17 @@ $ hugo server
173
201
Error: failed to download modules: binary with name "go" not found
174
202
```
175
203
176
-
This error occurs if the `go` programming language is not available on your system.
177
-
See this [section](https://www.docsy.dev/docs/get-started/docsy-as-module/installation-prerequisites/#install-go-language) of the user guide for instructions on how to install `go`.
178
-
204
+
This error occurs if the `go` programming language is not available on your
0 commit comments