Hugo: Comment in first row of templates makes the page go blank

Created on 28 Jan 2020  路  3Comments  路  Source: gohugoio/hugo

image (page is blank)

First row of layouts/blog/single.html

{{/*  TODO put images in blog folder  */}}
When I remove the comment, the page gets rendered. URL of the page that disappears: http://localhost:8080/blog/article-name/ I am using `_defaults/baseof.html`, but this doesn't show either. Or am i mistaken and it is a wanted feature? ### What version of Hugo are you using (`hugo version`)?
Hugo Static Site Generator v0.63.2-934EE21F/extended linux/amd64 BuildDate: 2020-01-27T12:20:42Z

(via npm: hugo-bin)

Does this issue reproduce with the latest release?

Yes

Bug

Most helpful comment

Or am i mistaken and it is a wanted feature?

It's a accidental side effect of Hugo 0.63. For now I suggest you move this comment inside the first define.

All 3 comments

Or am i mistaken and it is a wanted feature?

It's a accidental side effect of Hugo 0.63. For now I suggest you move this comment inside the first define.

That works, thanks!

This is still broken in 65.3:

Hugo Static Site Generator v0.65.3-211BA42A windows/amd64 BuildDate: 2020-02-23T09:58:40Z

A single (based on a "base-of") that starts with a comment and has only blocks/templates will result in 0 pages rendered.

{{- /*
    -----------------------------------------
    Block Name:
        foo

    Description:
        results in 0 pages rendered
    -----------------------------------------
*/ -}}
{{- define "foo" -}}
.......

Removing the initial comment allows rendering. The last time this worked was 63.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrissparksnj picture chrissparksnj  路  3Comments

mumblecrunch picture mumblecrunch  路  3Comments

MunifTanjim picture MunifTanjim  路  3Comments

carandraug picture carandraug  路  3Comments

geddski picture geddski  路  3Comments