Hugo 0.63.1 does not render whole site

Hi,

Just upgraded to 0.63.1 and when serving, nothing seems to be rendered – though no error.

Here is the output:

> hugo server -D --disableFastRender --gc

                   | EN
-------------------+------
  Pages            |  11
  Paginator pages  |   0
  Non-page files   | 414
  Static files     |   0
  Processed images |   0
  Aliases          |   0
  Sitemaps         |   1
  Cleaned          |   0

Built in 1174 ms

I reverted back to 0.62.2, and ran the same command :

> hugo server -D --disableFastRender --gc

                   | EN
+------------------+-----+
  Pages            | 112
  Paginator pages  |   0
  Non-page files   | 414
  Static files     |   0
  Processed images |   0
  Aliases          |   0
  Sitemaps         |   1
  Cleaned          |   0

Built in 929 ms

Something seems amiss?

(if needed I can share this private repo)

It is impossible to know without seeing the repo.

I suggest that you send a link in a PM either to me or @bep (who I’m sure would be interested to have a look) or better to both of us.

yeah, that’s what I thought – let me try one or two things out first. if I can’t resolve it, i’ll rope you guys in. thanks in advance.

Just messaged both of you guys.

Having the similar if not the same issue.

6:15:55 PM: Installing Hugo 0.62.2
6:15:55 PM: Hugo Static Site Generator v0.62.2-83E50184/extended linux/amd64 BuildDate: 2020-01-05T18:57:23Z
6:16:01 PM: +
6:16:01 PM: ------------------+------+
6:16:01 PM:   Pages            |   32
6:16:01 PM:   Paginator pages  |    4
6:16:01 PM:   Non-page files   |
6:16:01 PM:    0
6:16:01 PM:   Static files
6:16:01 PM: | 1405
6:16:01 PM:   Processed images |    0
6:16:01 PM:   Aliases          |
6:16:01 PM:     7
6:16:01 PM:   Sitemaps         |    1
6:16:01 PM:   Cleaned          |    0
6:16:01 PM: Total in 5869 ms


6:19:46 PM: Installing Hugo 0.63.1
6:19:47 PM: Hugo Static Site Generator v0.63.1-CE9ACEB7/extended linux/amd64 BuildDate: 2020-01-23T20:15:47Z
6:19:57 PM: hugo: collected modules in 9733 ms
6:20:00 PM: Building sites …
6:20:00 PM:                    |  EN
6:20:00 PM: -------------------+-------
6:20:00 PM:   Pages            |   32
6:20:00 PM:   Paginator pages
6:20:00 PM:  |    0
6:20:00 PM:   Non-page files   |    0
6:20:00 PM: Static files     | 1405
6:20:00 PM:   Processed images
6:20:00 PM:  |    0
6:20:00 PM:   Aliases          |    0
6:20:00 PM:   Sitemaps         |    1
6:20:00 PM:   Cleaned          |    0
6:20:00 PM: Total in 12796 ms

Source Code:

Sample Site using 62.2

Sample Deployment using 63.1
https://hugo63-1.bugo.io/

Hey just upgraded to v.06.2 – and still no luck. I’ve raised a github issue.

Ok, so I think i figured this out…

Tried fiddling around with the new(?) template lookup order but that didn’t seem to be the issue.

Then I just deleted some Go Template comments that were at the top of my layouts/***.html files and, bam, things are working now. These have been there for a while, some i’m not sure what had changed. I know there is an issue with HTML comments, but go comments should (ideally) be fine?

1 Like

Thank you for the suggested fix. I can confirm this issue for me as well.

I have a test site that renders 4 pages all based on the same template. This template (and may other that I wrote) start with leading comments / comment blocks. In 63.0 these templates rendered the expected 4 pages.

However if I change nothing but switch to Hugo 63.1 or Hugo 63.2 then 0 files are rendered.

If I remove the leading comments and rerender then the 4 expected pages are generated again via 63.2

Any leading comment even:

{{- /* test */ -}}

Will prevent Hugo 63.1 and 63.2 from generating results (at least on windows).

See also: https://github.com/gohugoio/hugo/issues/6823

1 Like