-
-
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
snippets of content and/or creating single page sites #534
Comments
Hi @mrenoch! #247 is about including other content in a content file using a shortcode. That's not possible right now. Fortunately you don't need that to build a single page site.
If you want to render one specific content you can identify it by the relative link:
For more make sure to check the "Template" section of the docs. It explains all you need. Hope that helps. Read the docs and feel free to ask if you have further questions! |
Thanks for the rapid response. Yes, I am trying to separate the snippets of content from the html, although at some level it's futile since the formatting seems to creep into these snippets, and the html is pretty clean and straightforward for non-programmers to edit. Still, a shortcode to pull in a particular piece of content (by slug? or whatever), would be powerful. I suppose I can fake that with sections, with one piece of content per section, but that's pretty cumbersome. I did read the Template section of the docs, but I still find it confusing . Perhaps a better running example would help tie this together? Maybe this already exists but I haven't found it? Thanks. |
I have to admit that the Template section of the docs is a bit confusing and it doesn't list all variable in the moment. But you can pull in a single content based by slug. |
Hello again, Thanks for the suggestion, but still no luck. The shortcode won't work since I am trying to include some content within the template (NOT from inside another piece of content) so I don't think shortcodes work. The range .Data.Pages examples you provided are very confusing. What does .RelPermalink refer to? I have tried multiple organizational layouts without any luck. I am unclear if the relpermalink refers to the filename, the path, the slug or what. On a related note, what kinds of debugging tools can I use with hugo - is there any way to step through the execution to inspect what variables are available to me? I know that Go isn't interpreted, but I am not sure how to approach making sense of the assumptions it's making. Thanks, |
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. |
Hi,
Great project!
I am looking at hugo to generate the ever-so-fashionable single page sites, e.g. http://html5up.net/helios or http://html5up.net/tessellate.
I am trying to wrap my head around how I can create content that will be pulled into the template. Can I include content by referencing it's slug?
Am I asking the same question as the one posed here?
#247
thanks!
The text was updated successfully, but these errors were encountered: