I’m trying to have a theme which has it’s own content directory (_index, about/, blog/, etc.) and I was hoping that the new theme inheritance functionality might allow for this, but I haven’t been able to get it to work. Are themes still not able to have their own content yet?
The answer is no.
Okay. Is this something that’s under consideration or willing to be?
It has been discussed. But it isn’t an obvious fit. Content is a project thing. I see some overlaps there, but I don’t want to inherit blog posts from a random theme, to put it like that.
Heya, what’s your use case for this? I haven’t figured one out on my own, but here is someone doing it!
As I don’t know your exact use case, I’m not sure if this would work for you.
But one way is to have your Markdown content in the theme’s data dir (as multi line TOML strings), and then have layout files parse and markdownify those data files.
Probable use case is having some content ready In case the editor has not defined any yet.
For example your theme can have header image and some carousel slides or some Page Resources on a home page bundle.
You could have those set in your theme’s content directory and available to be seen by the theme users upon activating the theme before they overwrire this « default » content with their own.
I remember this also being a topic when image processing was limited to Page Resources. Back then it seemed like the only way for theme builders to process images from the theme. Having them stored in some bundle in the theme.
The above being solved by Hugo Pipes, motivation for theme content is getting slimmer.