-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Disable single page output for designated sections #3612
Comments
I assume |
Yes. I was thinking that Sitemap would be separate a separate issue, but what you say looks like a logical conclusion to me. |
It may not be important at this point, but perhaps |
It cannot be a separate issue. We have nothing to link to in this case (no file on disk), so it would be confusing to put them in sitemap etc. |
Thanks for thinking of this. Honestly I don't understand "bags" so much yet. All I want is to have a section not create single pages while still using the content elsewhere (list view). |
I'm currently using this hack as posted in the forums:
This works for me as of Hugo 0.26. |
Could this be generalized to include disabling single page output for individual content files (presumably via front matter), or should that be a separate issue? For background see: https://discourse.gohugo.io/t/how-not-to-render-content-as-a-page/2208/3 |
It would be natural that this issue would cover both. I have deliberately waited with this issue until I see how my ls /blog/my-article
index.md
pretty-picture.png
some-content.md
some-more-content.md In the above (in how the world looks to me right now), The big question is: Should all of these resources be "permalinkable"?
|
Disabling whole sections is one thing but would it not also make sense to do this on a per page basis in Front Matter? Something like:
An example of this might be a blog that also references external content. Whilst you could have different sections this it results in a lot of duplication and complex joins on ranges and this isn't good for content management or development. Personally I'd be more than happy if .RelPermalink and similar properties were blank when this was used and it was up to developer to override the sitemap, rss or other templates where you might not want these items to appear. |
This will be handled by #4311 |
Couldn't this already be handled using section/branch bundle organization? |
By "this", I mean the feature request that @budparr originally made. |
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. |
As of Hugo 0.23 there is no way to designate a section of content to not output to single page while simultaneously use that content in other contexts of the site.
For a generic example, if I have a section called "authors," but do not want each author to have their own page on the site, yet I do want to use the entries on article pages or an aggregate/list "authors" page.
Data files are currently the most non-hackish way of accomplishing this, However, data files are not necessarily the best format for every type of content, particularly for content creators who may find it easier to create and manage discrete documents.
I think the best way to accomplish this would be configuration variable, such as
disableOutput = ['section-name', 'another-section]
I'm not sure if
disableOutput
is descriptive enough to capture that it's only skipping single pages. I used this to be consistent withdisableKinds.
The text was updated successfully, but these errors were encountered: