After looking through the 0.32 release notes from last month and making a few attempts to use the asset bundling code, I’d have to say it seems like it’s definitely still working out it’s sea legs.
Just to confirm… the bundle feature is primarily focused around image processing/reference, correct?
Right now I’m in the boat where I have a few hundred MP3 files. Currently Hugo can’t introspect any of the ID3 content, so the next step was to extract it into JSON and just have each directory have a file called “media.json” to read in. Honestly, I would prefer not to deal with a JSON file at all, but it seems equally weird to just shove all of that in the front matter rather than managing the files+metadata as a bundled unit.
I’ve tried to read this for typos, but I’m falling asleep and have lost about 4 hours of my life to trying to figure this out.
In the mean time, there are a few threads you can read on and googling you can do to learn more about the matter. (Search for “Page Resources”, “metadata”)
Also the GitHub commits/PR are a detailed read, @bep documents heavily in his code:
I really like to start using resources and page bundles as well, but it’s hard without coherent documentation. I’ve also tried a few hours trying to get it to work. What’s currently the best place to start to get a hang of this (I believe, very powerful) feature of Hugo?
And follow the blue links to resources and image processing.
The “bundle part” of this is very short at the moment. But it is a simple concept if you can wrap your head around it:
It you focus on the index.md variant, it means that any file in that same folder and below will become resources in that bundle. And that images will get “special power”.
If that isn’t “coherent” enough, I siggest you revisit this in some time. We should eventually get around to it.
I prefer to have my posts as name-of-blog-post.md instead of foldes with an index.html file. Is there an other way to automatically create a bundle for a specific page? For example, by creating a folder on the same level, with the same name as the markdown file? Like so:
The name of your main bundle file (e.g. index.md) is more or less set in stone (naming schemes such as this breaks fast when you start to say “I prefer a completely different setup …”). But you have endless flexibility in the URL scheme. And for all practical use, the bundle folder name will be used.