Question
Could someone please explain to me what exactly is a Page Bundle ? I tried to
Reading the Docs
Googleing It
Watch YouTube Videos
But, alas, I still donβt understand it.
If someone could explain it as if they were explaining it to a child, that will be greatly appreciated.
content/
βββ books
βββ book-1.md <-- page
βββ book-2 <-- page bundle, specifically a leaf bundle
β βββ cover.jpg
β βββ index.md
βββ book-3 <-- page bundle, specifically a branch bundle
βββ chapter-1.md
βββ chapter-2.md
βββ cover.jpg
βββ _index.md
https://gohugo.io/content-management/page-bundles
Leaf Bundle β A directory in content/
(at any nested hierarchy) containing index.md
.
Branch Bundle β A directory in content/
(at any nested hierarchy) containing _index.md
(note the _
prefix)
A page bundle is either a leaf or a branch bundle.
A branch bundle can nest more leaf/branch bundles, while a leaf bundle cannot.
If you do not need the bundles related Hugo features (like resource fetching, etc.), just create plain Markdown files in the content/
directory that are not named index.md
or _index.md
.
What is the difference between _index.md and index.md ?
Umm⦠just that _index.md marks a directory as branch bundle and another marks a leaf bundle.
See the above link to understand more on the differences between these 2 bundles.
I had written this post when this feature was released few years back: Hugo: Leaf and Branch Bundles β A Scripter's Notes . See if that helps. But I think that the Hugo docs are pretty concise enough.
I really want to use this , but I donβt know where to put my videos. Can you please take a look and explain to me what I need to do? (By the way, Iβm not the creator of this repo)
As stated in the readme put your videos in the page bundle. Reading @kaushalmodi βs post will help.
If you need more help, show us in a repo what youβve already done.
Hereβs my repo.
Also, hereβs where I store all of my posts.
Iβve tried putting my *.mp4 videos in multiple locations. I want this blog post to have the video playing.
Here are the locations where I tried to store my videos:
You should copy your video files in the page bundle not in a subfolder. See this example:
with following result:
https://moodlebox.net/en/help/root-certificate-install-macos/
So, I need to store my video files like this:
content
βββ notes
βββ post
βββ videos
βββ about.md
βββ contact.md
No, like this (adapted from @jmooring , thanks to him):
content/
βββ post
βββ post-1.md <-- page
βββ post-2 <-- page bundle, specifically a leaf bundle
β βββ cover.jpg
β βββ video.mp4
β βββ index.md
βββ post-3 <-- page bundle, specifically a branch bundle
βββ chapter-1.md
βββ chapter-2.md
βββ cover.jpg
βββ othervideo.mp4
βββ yetanothervideo.mp4
βββ _index.md
1 Like
system
Closed
January 22, 2022, 9:14pm
15
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.