@@ -66,13 +66,15 @@ The following shows you how to install Hugo from the release page:
66663 . Download the latest extended version
6767 (` hugo_extended_0.9X_Linux-64bit.tar.gz ` ).
68684 . Create a new directory:
69+
6970 ``` sh
7071 mkdir hugo
7172 ```
7273
73745. Extract the files you downloaded to ` hugo` .
7475
75766. Switch to your new directory:
77+
7678 ` ` ` sh
7779 cd hugo
7880 ` ` `
@@ -105,9 +107,8 @@ If you have Node installed already, check your version of Node. For example:
105107node -v
106108` ` `
107109
108- Install or upgrade your version of Node to the ** active [LTS release][]** . We
109- recommend using ** [nvm][]** to manage your Node installation (Linux command
110- shown):
110+ Install or upgrade your version of Node to the ** active [LTS release][]** . We recommend
111+ using ** [nvm][]** to manage your Node installation (Linux command shown):
111112
112113` ` ` sh
113114nvm install --lts
@@ -122,9 +123,8 @@ To build or update your site's CSS resources, you'll also need
122123{{% alert title=" IMPORTANT: Check your Node version" color=" warning" %}}
123124
124125The PostCSS package installed by some older versions of Node is incompatible
125- with Docsy. Check your version of Node against the ** active [LTS release][]**
126- and upgrade, if necessary. For details, see [Node: Get the latest LTS
127- release][latest-lts].
126+ with Docsy. Check your version of Node against the ** active [LTS release][]** and
127+ upgrade, if necessary. For details, see [Node: Get the latest LTS release][latest-lts].
128128
129129[lts release]: https://nodejs.org/en/about/releases/
130130[latest-lts]: # node-get-the-latest-lts-release
@@ -169,8 +169,8 @@ your project's root directory:
169169 git checkout v{{% param version %}}
170170 ```
171171
172- To work from the development version of Docsy (not recommended),
173- run the following command instead:
172+ To work from the development version of Docsy (_not recommended_), run the
173+ following command instead:
174174
175175 ```sh
176176 git submodule add --depth 1 https://github.com/google/docsy.git themes/docsy
@@ -182,9 +182,9 @@ your project's root directory:
182182 echo ' theme: docsy' >> hugo.yaml
183183 ```
184184
185- {{% alert title="Tip" %}}
186- In Hugo 0.110.0 the default config base filename was changed to `hugo.*` from `config.*`.
187- If you are using hugo 0.110 or above, consider renaming your `config.*` to `hugo.*`!
185+ {{% alert title="Tip" %}}As of Hugo 0.110.0, the default config base
186+ filename was changed to `hugo.*` from `config.*`. If you are using hugo
187+ 0.110 or above, consider renaming your `config.*` to `hugo.*`.
188188 {{% /alert %}}
189189
1901903. Get Docsy dependencies:
@@ -242,8 +242,8 @@ npm install
242242> ** Important** : read the [Docsy NPM install side-effect] note.
243243
244244To work from the development version of Docsy (not recommended unless, for
245- example, you plan to upstream changes to Docsy), omit the ` -b v{{% param version
246- %}}` argument from the clone command above.
245+ example, you plan to upstream changes to Docsy), omit the
246+ ` -b v{{% param version %}}` argument from the clone command above.
247247
248248Then consider setting up an NPM [prepare][] script, as documented in Option 1.
249249
@@ -260,7 +260,7 @@ You can use Docsy as an NPM module as follows:
260260 ` ` ` sh
261261 hugo new site --format yaml myproject
262262 cd myproject
263- echo ' theme: docsy' >> hugo.yaml
263+ echo " theme: docsy\nthemesDir: node_modules " >> hugo.yaml
264264 ` ` `
265265
2662662. Install Docsy, and postCSS (as [instructed earlier](# install-postcss)):
@@ -276,18 +276,28 @@ You can use Docsy as an NPM module as follows:
276276 path to the Docsy theme files. For example, build your site as follows:
277277
278278 ` ` ` console
279- $ hugo --themesDir node_modules
279+ $ hugo
280280 Start building sites …
281281 ...
282- Total in 1890 ms
283282 ` ` `
284283
285- You can drop the ` --themesDir ...` flag by adding the themes directory to
286- your site' s configuration file:
284+ {{% alert title=" Error: failed to load modules" color=" warning" %}}
287285
288- ```sh
289- echo ' themesDir: node_modules' >> hugo.yaml
290- ```
286+ If Hugo reports the following error when building your site ([# 2116]):
287+
288+ ` ` `
289+ Error: failed to load modules: module " github.com/FortAwesome/Font-Awesome" not found in " .../myproject/node_modules/github.com/FortAwesome/Font-Awesome" ...
290+ ` ` `
291+
292+ Then run the following command and try again:
293+
294+ ` ` ` sh
295+ npm rebuild
296+ ` ` `
297+
298+ [# 2116]: https://github.com/google/docsy/issues/2116
299+
300+ {{% /alert %}}
291301
292302As an alternative to specifying a ` themesDir` , on some platforms, you can
293303instead create a symbolic link to the Docsy theme directory as follows (Linux
@@ -312,8 +322,7 @@ $ ls themes
312322docsy github.com
313323` ` `
314324
315- This is a workaround necessary to support Docsy' s use as a single [Hugo module]
316- ([# 1120]).
325+ This is a workaround necessary to support Docsy' s use as a single [Hugo module] ([#1120]).
317326
318327[#1120]: https://github.com/google/docsy/issues/1120
319328[0.8.0]: https://github.com/google/docsy/blob/main/CHANGELOG.md/#080
0 commit comments