By Developers, For Developers

Historical errata for Build Websites with Hugo

PDF PgPaper PgTypeDescriptionFixed onComments
17TYPO

“Typiocal” under building a home page heading

2020-02-17
18TYPO

As you can see in the figure, the “home page” of the site has its own loyout.

Loyout

2020-02-17
7TYPO

KkkkkkRun

2020-02-17
19TYPO

Incomplete sentence?

> And since the context will be passed for you,

2020-02-17
47TYPO

“emember” at bottom of page -> remember

2020-02-17
17SUGGEST

Under “Using Content Blocks and Partials”:

Change “Locate the file layouts/_default/baseof.html…” to “Locate the file themes/basic/layouts/_default/baseof.html”—or add an explicit “cd themes/basic” beforehand.

2020-02-17
3TYPO

Under the description of the archetypes directory it is said:
> There’s a default one that places a title and date in the file and sets the
draft status to false.

But the default value of the draft status is true

2020-02-17
5TYPO

Under the image showing the layout for the pages there is the phrase
>As you can see in the figure, the “home page” of the site has its own loyout.

Probably the last word should be layout.

2020-02-17
10ERROR

Starting the Server with
$ hugo server
does not show the about page - it shows 404.
Because the template contains “draft: true”
I had to start the server with
$ hugo server —buildDrafts
or
change draft to “draft: false”.

2020-02-24
10SUGGEST

Wow, I checked twice, but after reading “Your turn” on Page 12 I went back once again and now I see that Page 9 say’s “change to draft: false”.
I’m sorry! I can’t delete my error submission now.

2020-02-24:) Not a problem. It's worth looking at again anyway to make sure it's clear - if it tripped you up it might trip up others too.
30TYPO

Under “Creating the List Layout”:

“Let’s define a default list template that will work for all list pages on the site.
Open the file templates/basic/layouts/_default/list.html”.

Should be “themes/basic/layouts/_default/list.html”.

2020-03-25
31TYPO

“In the exercises at the end of Chapter 2, Building a Basic
Theme, on page 15 you moved your navigation from the header partial to its
own nav partial. Open themes/layouts/partials/nav.html…”

Should be “/themes/basic/layouts/partials/nav.html”

2020-03-25
32TYPO

At bottom of page:

“Open themes/static/css/style.css in your editor. Locate the media query that targets
screens larger than 768 pixels wide”

Should be “Open themes/basic/static…”

2020-03-25
19TYPO

In the first line of the page footer path says
themes/basic/layouts/_default/partials/footer.html

instead of
themes/basic/layouts/partialsfooter.html

2020-03-25
30TYPO

When changing the default list template the path used is
template/basic

but I think it should be
themes/basic

2020-03-25
30TYPO

“collects all the pages within content/products instead of content/projects”
I think it should be content/projects

2020-03-25
45TYPO

When look were to place the json, contact.html and modification to contact.md it made it feel like you should add these to the ‘data/..’. folder structure.

I think adding the ‘data/…’ in front of your example code can throw folks off.

2020-03-25
17ERROR

I followed the chapter. The code stops working after page 17. Seems like a version mismatch. Please indicate the hugo version no used for writing the book code

2020-03-25The Hugo version number is displayed in the first chapter when we install Hugo. I can make this more explicit. But without knowing what you tried, I can't tell what the error is. I've run through the code up to that point in the book with the latest Hugo and it works well past page 17.
20TYPO

“kkkkkkkkRun” looks like a typo.

2020-03-25
50SUGGEST

On discussing custom fields in the front matter section you write “Any custom fields you add to the front matter get added to this .Params collection.” which is clear and understandable.
What is missing IMHO is an introduction/definition what are standard-fields of front matter.
Maybe even a link to the official documentation [gohugo.io/content-management/front-matter/#predefined] would be enough.

2020-03-25That's a great observation and one I had wanted to cover but just forgot. I've added this now. Thank you.
4TYPO

“A tyopical web page…” just after the heading “Building The Home Page”.

2020-03-25
15TYPO

Building the Home Page
A typiocal web <- A typical web

2020-03-25
35SUGGEST

None of the above, really. I want to praise the “your turn” tasks - it’s pretty much exactly what I was wanting to fiddle with, and should give me exactly the reinforcement/familiarity with the tool that I want before moving forward.

2020-03-25Well thank you so much for the kind words. Very glad to hear that feedback.
89TYPO

In the stemming section, where you disable it in the pipeline you add two line of code to the pipeline:

this.pipeline.remove(lunr.stemmer)
this.searchPipeline.remove(lunr.stemmer)

Both lines are without ending semicolon, which is different from the style of the other lines

2020-03-25
97TYPO

The “Powered by” href anchor is gohugo.com but should be gohugo.io

2020-03-25
100TYPO

In the figure shortcode the “alt” of the image is “Mout Rushmore”, should be “Mount Rushmore”

2020-03-25
116TYPO

In the “Keep you AWS credentials safe” section the last phrase is “amd keep them out of version control”. It should be “and keep them out of version control”.

2020-03-25
32TYPO

First sentence, underscore “_” should be dash “-”:

- Found “In the project_list section”
- Expected “In the project-list section”

2020-03-25
xiiSUGGEST

In the Conventions section, consider adding a convention for web page views. After you list code sections in the book, you frequently show what the results of the code changes are by showing a web page view. It would help to distinguish the web page views by adding a border around them.

2020-03-26We'll look into this during the production process. Thanks!
18TYPO

As you can see in the figure, the “home page” of the site has its own loyout.

2020-03-25
xiiSUGGEST

You provide links to the Jekyll and Gatsby websites in footnotes, but perhaps there should be a footnote with a link to the Hugo website before those.

2020-04-15
28SUGGEST

The examples still does not work.
Kicking_tires - Works
basic_theme - Does not work
content_sections - Does not work

2020-04-15I have downloaded the example code and run it against Hugo 0.68. They build without errors. I have also followed the first three chapters as written. That's all I can do without more detail. I haven't received any other feedback from readers that the book doesn't work as written; in fact others have shared their successful sites with me. If you need specific help, you can reach out on twitter @bphogan and I can try to help.
4-122SUGGEST

I followed the steps in each chapter, editing the files in my IDE conforming to the examples in the book. In particular, I copy&paste the lines to be added from the eBook (as PDF) to my IDE. Such lines are marked with “>” in the left margin. The problem is: when selecting the lines marked with “>”, the “>” is included in the text. After pasting I have to remove the “>” one by one. Not blocking, just a nuisance.
My suggestion: find a way of highlighting “text to be added” in a way that does not copy to the clipboard. For example, use a change bar, or use a text background color.

60TYPO

in the boxed text the line
hugo gen chromastyles —style=github > syntax.css
should read
hugo gen chromastyles —style=github > syntax.css

6SUGGEST

The index.html show as {{ .Content }} contains a space between the curly braces. If you enter this in this way in your editor you get a parsing error. This additional space could however be due to the code formatting. If it was however meant/entered with a space this looks like an error (at least in in v0.70)

25ERROR

The chapter begins by asking you to create the file archetypes/projects.md…but doesn’t say where. in the project’s archetypes directory? In the theme?

Then, the code snippet to insert is listed as being in content_sections/portfolio/archetypes/projects.md—but I was never asked to create that file path, or told where it should exist. So—continuing with the rest of the chapter is impossible.

41ERROR

the code asked for this in the header.html <link rel=“stylesheet” href=“{{ ”css/style.css" | relURL }}"> but my ide keeps telling me that it cannot resolve the file and also that css is not allowed (using IntelliJ webstorm but I have the Hugo plugin) the code I am using matches the code from the books download and even if webstorm is wrong the code fails in regeneration. I am assuming the static/css is located by the Hugo template here adding it in {{}} the double curly braces

22TYPO

The html/templates library is used and the link is wrong. There is no http/templates library.

6552ERROR

When I add “url: project.json” to the frontmatter of /contents/projects/_index.md after following the previous instructions. I get a RSS output at localhost:132/projects.json
The only way to get JSON for that URL is only allow JSON as “outputs” in the frontmatter. This is not clear in the book unless something has changed in the meantime in Hugo. Currently using Hugo v0.70.0

Categories: