Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment in first row of templates makes the page go blank #6816

Closed
shiftgeist opened this issue Jan 28, 2020 · 4 comments · Fixed by #6831
Closed

Comment in first row of templates makes the page go blank #6816

shiftgeist opened this issue Jan 28, 2020 · 4 comments · Fixed by #6831
Milestone

Comments

@shiftgeist
Copy link

shiftgeist commented Jan 28, 2020

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

@bep bep added the Bug label Jan 28, 2020
@bep
Copy link
Member

bep commented Jan 28, 2020

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.

@bep bep added this to the v0.64 milestone Jan 28, 2020
@shiftgeist
Copy link
Author

That works, thanks!

@jstromergalley
Copy link

jstromergalley commented Feb 26, 2020

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

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants