-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Cannot .Render a section page from the homepage layout. #3398
Comments
This is duplicate of #3245 I'm not sure how well this worked in earlier Hugo; you may wait and see if we implement this for Hugo 0.21 -- but I would recommend that you refactor your templates (a section page is not a single page). |
Huh. My comment didn't show up @aroig I apologize. I'm having interstitial connectivity here at work. (This has also never happened before.) Didn't mean to close without commenting, but if you want some support on this, please visit the forums at https://discuss.gohugo.io . |
@bep Thanks, I missed that one. @rdwatters Ok, If I have anything to ask I'll go to the forums, but I'm pretty sure that this is either a regression or a feature request, depending on how you look at it. I don't think there is currently a way in hugo to have a layout template to copy the contents of an other page, without http redirects, and without copying the contents of the template. By the way, being able to use block templates for the homepage would help. |
But now we are borderline what is best solved on the discussion forum: https://discuss.gohugo.io/ @rdwatters I deleted your comment as I was typing my reply ... |
By accident or was there something wrong with my reply? 😄 |
I marked it as a duplicate, hence it is a "valid issue"; I only send people to the discussion site for issue that can not be resolved here (i.e. questions). |
Got it. |
Yes, that is what I'll do. I preferred a full {{ .Render }} or block template because even with partials there is a small amount of duplication. But I guess can live with that.
Hmm... I can't make them work. They render empty for the home page. Thanks. |
Please, disregard that. They do work indeed. I must have been doing something wrong on the earlier tests. I'm sorry. |
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. |
I would like to render a copy of a section page as the homepage. To that end have a
layout/index.html
that looks like this:Where "about" is a section page with content from an
_index.md
file.The thing worked for a while, but after a recent update to hugo 0.20 it produces a blank page.
The text was updated successfully, but these errors were encountered: