# \#book-build-websites-with-hugo

**URL:** https://forum.devtalk.com/tag/book-build-websites-with-hugo/202.md

[Latest](https://forum.devtalk.com/latest.md) · [Categories](https://forum.devtalk.com/categories.md) · [Tags](https://forum.devtalk.com/tags.md)

---

## [Build Websites with Hugo: Using with recent Hugo versions](https://forum.devtalk.com/t/build-websites-with-hugo-using-with-recent-hugo-versions/195442)

<div class="topic-metadata">

**Author:** [@bphogan](https://forum.devtalk.com/u/bphogan)\
**Replies:** 1\
**Last updated:** [4 July 2025 15:31 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-using-with-recent-hugo-versions/195442 "2025-07-04T15:31:06Z")

</div>

Hi friends. If you’re reading the book and trying to follow along with the first chapter, you’ll immediately find some major differences. Hugo has evolved considerably since I wrote this book. Now when you generate a ne…

---

## [Build Websites with Hugo: hugo 0.86 not working with examples after Chapter 2](https://forum.devtalk.com/t/build-websites-with-hugo-hugo-0-86-not-working-with-examples-after-chapter-2/13792)

<div class="topic-metadata">

**Author:** [@yam655](https://forum.devtalk.com/u/yam655)\
**Replies:** 3\
**Last updated:** [24 November 2024 22:34 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-hugo-0-86-not-working-with-examples-after-chapter-2/13792 "2024-11-24T22:34:34Z")

</div>

I bought the book to help familiarize myself with Hugo. The examples in Chapter 1 worked fine. I know it isn’t my Hugo installation, as I can run both official as well as theme-specific starters. Starting in Chapter 2…

---

## [Build Websites with Hugo: Comments Befuddle Hugo](https://forum.devtalk.com/t/build-websites-with-hugo-comments-befuddle-hugo/111075)

<div class="topic-metadata">

**Author:** [@edskinner](https://forum.devtalk.com/u/edskinner)\
**Replies:** 1\
**Last updated:** [3 June 2023 23:33 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-comments-befuddle-hugo/111075 "2023-06-03T23:33:01Z")

</div>

HTML-style comments (and Hugo-style, as well) in any of the .html input files (index.html, layouts//\*, etc.) cause Hugo to silently generate an empty output. Very annoying for those who wish to “document their code.”

---

## [Build Websites with Hugo: Typo (page 32)](https://forum.devtalk.com/t/build-websites-with-hugo-typo-page-32/111475)

<div class="topic-metadata">

**Author:** [@edskinner](https://forum.devtalk.com/u/edskinner)\
**Replies:** 0\
**Last updated:** [3 June 2023 23:37 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-typo-page-32/111475 "2023-06-03T23:37:07Z")

</div>

@bphogan In the list.html at the bottom of the page, there are two sections. The outer one sets class=“projects” but there is no CSS for that. It should be singular (“project”) as is used in the second (inner) section. …

---

## [Build Websites with Hugo: Comments in Hugo Input Files](https://forum.devtalk.com/t/build-websites-with-hugo-comments-in-hugo-input-files/111076)

<div class="topic-metadata">

**Author:** [@edskinner](https://forum.devtalk.com/u/edskinner)\
**Replies:** 0\
**Last updated:** [31 May 2023 18:22 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-comments-in-hugo-input-files/111076 "2023-05-31T18:22:28Z")

</div>

Add a note in the download .zip file with errata, and include the fact that Hugo silently produces an empty output if it encounters an HTML comment in any of its input files (layouts/index.html, layouts//\*.html, etc.).

---

## [Build Websites with Hugo: Code in chapter two won't run](https://forum.devtalk.com/t/build-websites-with-hugo-code-in-chapter-two-wont-run/6324)

<div class="topic-metadata">

**Author:** [@chriswadams](https://forum.devtalk.com/u/chriswadams)\
**Replies:** 6\
**Last updated:** [31 May 2023 18:22 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-code-in-chapter-two-wont-run/6324 "2023-05-31T18:22:25Z")

</div>

I’m working through Mr. Hogan’s book, and the code has been running fine, until I got to the section “Using Content Blocks and Partials” in chapter 2. When I substituted the following code for ‘index.html’, I got a blank…

---

## [Build Websites with Hugo:](https://forum.devtalk.com/t/build-websites-with-hugo/71676)

<div class="topic-metadata">

**Author:** [@gerbreown](https://forum.devtalk.com/u/gerbreown)\
**Replies:** 4\
**Last updated:** [17 January 2023 17:15 UTC](https://forum.devtalk.com/t/build-websites-with-hugo/71676 "2023-01-17T17:15:31Z")

</div>

It would be VERY helpful if an INDEX was included at the end.

---

## [Build Websites with Hugo: Error in command to create syntax.css (59)](https://forum.devtalk.com/t/build-websites-with-hugo-error-in-command-to-create-syntax-css-59/43674)

<div class="topic-metadata">

**Author:** [@JRombouts](https://forum.devtalk.com/u/JRombouts)\
**Replies:** 0\
**Last updated:** [6 March 2022 16:16 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-error-in-command-to-create-syntax-css-59/43674 "2022-03-06T16:16:01Z")

</div>

The “Joe asks: Does Hugo Support Syntax Highlighting for Code” has a formatting mistake: $ hugo gen chromastyles --style=github &gt; syntax.css should be $ hugo gen chromastyles --style=github \> syntax.css (&gt; → \>) …

---

## [Build Websites with Hugo: git add package.json](https://forum.devtalk.com/t/build-websites-with-hugo-git-add-package-json/33890)

<div class="topic-metadata">

**Author:** [@eatrero](https://forum.devtalk.com/u/eatrero)\
**Replies:** 0\
**Last updated:** [23 December 2021 19:46 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-git-add-package-json/33890 "2021-12-23T19:46:59Z")

</div>

This suggestion is in regards to page 114 in the pdf, for the chapter Deploying the Site. After the editing package.json, the following git instructions are shown: $ git add config.toml $ git commit -m "Set the ..." $ g…

---

## [Build Websites with Hugo: .ByDate.Reverse not working?](https://forum.devtalk.com/t/build-websites-with-hugo-bydate-reverse-not-working/29561)

<div class="topic-metadata">

**Author:** [@curranjohn](https://forum.devtalk.com/u/curranjohn)\
**Replies:** 0\
**Last updated:** [17 November 2021 15:22 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-bydate-reverse-not-working/29561 "2021-11-17T15:22:57Z")

</div>

On page 66 of “Build Websites with Hugo” the .ByDate.Reverse doesn’t seem to have any impact on the project page. I download the source code and added the change but nothing happens. e.g. {{ range first 1 (where .Site.…

---

## [Build Websites with Hugo:](https://forum.devtalk.com/t/build-websites-with-hugo/24730)

<div class="topic-metadata">

**Author:** [@jottinger](https://forum.devtalk.com/u/jottinger)\
**Replies:** 1\
**Last updated:** [8 November 2021 20:00 UTC](https://forum.devtalk.com/t/build-websites-with-hugo/24730 "2021-11-08T20:00:10Z")

</div>

Title: Build Websites with Hugo #book-build-websites-with-hugo Source code for search is incomplete: search/portfolio/static has no js directory, and based on the chapter contents, it should.

---

## [Spotlight: Brian Hogan (Author)](https://forum.devtalk.com/t/spotlight-brian-hogan-author/17726)

<div class="topic-metadata">

**Author:** [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Replies:** 6\
**Last updated:** [7 October 2021 20:14 UTC](https://forum.devtalk.com/t/spotlight-brian-hogan-author/17726 "2021-10-07T20:14:29Z")

</div>

A Hero’s Journey with Brian P. Hogan @bphogan Brian P. Hogan, author of Build Websites with Hugo, discusses his journey to becoming a Pragmatic Bookshelf author. INTERVIEW Listen to the complete audio intervie…

---

## [Build Websites with Hugo: wrong file path (p. 18)](https://forum.devtalk.com/t/build-websites-with-hugo-wrong-file-path-p-18/10776)

<div class="topic-metadata">

**Author:** [@dmitry-kabanov](https://forum.devtalk.com/u/dmitry-kabanov)\
**Replies:** 0\
**Last updated:** [23 June 2021 18:44 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-wrong-file-path-p-18/10776 "2021-06-23T18:44:33Z")

</div>

In the last paragraph on p. 18 it refers to the file themes/basic/layouts/\_default/par- tials/footer.html, however, \_default should be omitted.

---

## [Build Websites with Hugo: page 52 Your Turn item 3](https://forum.devtalk.com/t/build-websites-with-hugo-page-52-your-turn-item-3/9978)

<div class="topic-metadata">

**Author:** [@Carpintonto](https://forum.devtalk.com/u/Carpintonto)\
**Replies:** 1\
**Last updated:** [28 May 2021 05:46 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-page-52-your-turn-item-3/9978 "2021-05-28T05:46:17Z")

</div>

Incorporate the social media links into your site’s footer. Include the code in a partial. I’m stuck and I think it’s a scoping issue. I pasted the ul block from contact.html into a partial I call social.html \<ul\> …

---

## [Build Websites with Hugo: Code will not run in a working Hugo setup](https://forum.devtalk.com/t/build-websites-with-hugo-code-will-not-run-in-a-working-hugo-setup/2055)

<div class="topic-metadata">

**Author:** [@ianwillie](https://forum.devtalk.com/u/ianwillie)\
**Replies:** 3\
**Last updated:** [29 January 2021 18:54 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-code-will-not-run-in-a-working-hugo-setup/2055 "2021-01-29T18:54:24Z")

</div>

Hello Brian, I have some problems with running the code in your book. I like the style of the book very much and I have learnt a lot as a complete beginner with Hugo but quite experienced with linux. I bought the book …

---

## [Build Websites with Hugo - typo 'css.style.scss' (page 93)](https://forum.devtalk.com/t/build-websites-with-hugo-typo-css-style-scss-page-93/1194)

<div class="topic-metadata">

**Author:** [@kamimura](https://forum.devtalk.com/u/kamimura)\
**Replies:** 0\
**Last updated:** [31 July 2020 08:15 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-typo-css-style-scss-page-93/1194 "2020-07-31T08:15:37Z")

</div>

First, rename … to themes/basic/assets/css.style.scss → First, rename … to themes/basic/assets/css/style.scss

---

## [Build Websites with Hugo (PragProg)](https://forum.devtalk.com/t/build-websites-with-hugo-pragprog/422)

<div class="topic-metadata">

**Author:** [@PragmaticBookshelf](https://forum.devtalk.com/u/PragmaticBookshelf)\
**Replies:** 0\
**Last updated:** [16 April 2020 17:08 UTC](https://forum.devtalk.com/t/build-websites-with-hugo-pragprog/422 "2020-04-16T17:08:49Z")

</div>

Database-driven sites bring complexity you might not need, but building a site by hand is too much work. Hugo is a static site generator and web development framework that creates content sites quickly without the overhe…
