Hi, i can’t seem to get shorcodes to work on the homepage ( index.html )
i get this error:
Error while rendering homepage: html/template: “theme/index.html” is an incomplete template
but inserting the shortcode into a random *.md file works
so - is it possible to use shortcodes inside the homepage?
Shortcodes does not work in template files (i.e. html files).
Not sure if it’s possible to attach a content (*.md) file to the home page.
might work if you have
index.html defined right and also have an
index.md in your
content/ renderer. I’m not sure whether
layouts/…/single.html might render there, but…
It’s possible, but currently not using that approach. I responded somewhere else in this forum with a pretty detailed how to. On mobile in meeting right now. Can help later if you can’t find it.
Is this the topic you were thinking about?
Converting a small static site from WP to Hugo, and loving it so far 😃 I ran into a small problem when doing the homepage (first page) though. I would like to grab its content from content/home.md, and use the standard layouts/_default/single.md...
Reading time: 3 mins 🕑
Likes: 8 ❤
Yes, that should do the trick - i just have to create a new template - let’s say “_default/homepage.html” and parse a page that hase a certain .title with that template - right?!
Yes that sounds about right
Yes. That’s the one. Perhaps we should add this to the docs until a better solution emerges.
Yeah that would be great, because the dokumentation does not tell a lot about the creation and layout of the homepage except that 'it' s different' :) thank you for the help. I like this board a lot. So fast and helpful answers :)