Difference between Page Bundles and Sections?

Both of them are in Content Management.
Both of them are used to organize content.

Why we create two similar concept to org content, is there any specific reason?

Please help me to understand it well, so that I know what’s the best practices to use those two concepts.

A page bundle is a single page with assets.

A section is a collection of many pages and/or sub sections.

Hi frjo, Thanks for reply.

In the Page Bundles doc.

There are two types of Page Bundles.

  • Leaf Bundle is for single page.
  • Branch Bundle is for section pages

That’s why makes me confused, why we need those two different concepts for page and pages.

  • Branch bundles (for sections etc.) offer a list view and render a list template.
  • Leaf bundles are single pages.

A list view requires a more complex data structure than a single page and is usually applied less often.

And there is another kind of content view one may say, which we can apply in a more flexible way: taxonomies and their terms.

1 Like

There are two distinct and orthogonal concepts: bundle types and page kinds.

leaf bundle branch bundle
home :x: :heavy_check_mark:
page maybe :x:
section :x: :heavy_check_mark:
taxonomy :x: :heavy_check_mark:
term :x: :heavy_check_mark:

1) Every section is a branch bundle, even top-level sections without _index.md files (new in v0.123.0, a very good thing)

2) Every branch bundle is not necessarily a section

That makes a lot sense.

Bundle related to filesystem. And section here is related to Page kind.

Based on those domain knowledge, here is my use case:

I want to use Hugo help me to build a online book service, which should have features like:

  1. Create book with name
  2. Create menu
  3. Create preface
  4. Create Chapter
  5. Create Section

So the API provided by Hugo will looks like:

  1. Create book with name
    1. POST /site/name
    2. POST /site/page/home
  2. Create menu
    1. POST /site/page
  3. Create preface
    1. POST /site/page
  4. Create Chapter
    1. POST /site/page/section
  5. Create Section
    1. POST /site/page/section?parent

Any suggestion?
Maybe I need to start another thread to discuss it.

Just create another thread to continue the discussion, thanks a lot.

Use Hugo API to build a online book service