diff --git a/content/content-management/bundles/_index.md b/content/content-management/bundles/_index.md index 29373fe16..78b82cc98 100644 --- a/content/content-management/bundles/_index.md +++ b/content/content-management/bundles/_index.md @@ -2,11 +2,11 @@ title : "Bundles" description : "Content organization using Bundles" date : 2018-01-24T13:09:00-05:00 -lastmod : 2018-01-24T13:27:22-05:00 +lastmod : 2018-01-25T16:35:56-05:00 +linktitle : "Bundles" categories : ["content management", "bundles"] draft : false toc : true -linktitle : "Bundles" menu : docs: identifier : "bundles" @@ -14,4 +14,7 @@ menu : weight : 9 --- -Content in "Bundles" branch. +| Bundle type | Index file name | +|-------------|--------------------------------------------------------------------------| +| Page | `index.md` or `index.html` or any `index.*` file with valid MIME type | +| Section | `_index.md` or `_index.html` or any `_index.*` file with valid MIME type | diff --git a/content/content-management/bundles/image-processing/index.md b/content/content-management/bundles/image-processing/index.md index 6976bcb88..7dc5e3bff 100644 --- a/content/content-management/bundles/image-processing/index.md +++ b/content/content-management/bundles/image-processing/index.md @@ -1,13 +1,13 @@ --- title : "Image Processing" -description : "Hugo API for processing images that are part of page, section or branch bundles" +description : "Hugo API for processing images that are part of page or section bundles" date : 2018-01-24T13:10:00-05:00 -lastmod : 2018-01-24T13:45:08-05:00 +lastmod : 2018-01-25T15:59:07-05:00 +linktitle : "Image Processing" categories : ["content management", "bundles"] weight : 4004 draft : false toc : true -linktitle : "Image Processing" --- Image processing is available on Page Resources. diff --git a/content/content-management/bundles/page-bundles/index.md b/content/content-management/bundles/page-bundles/index.md index 6412b354e..034f7453b 100644 --- a/content/content-management/bundles/page-bundles/index.md +++ b/content/content-management/bundles/page-bundles/index.md @@ -1,13 +1,58 @@ --- title : "Page Bundles" description : "Organization of individual pages as bundles" -date : 2018-01-24T13:10:00-05:00 -lastmod : 2018-01-24T13:45:07-05:00 +lastmod : 2018-01-25T16:38:34-05:00 +linktitle : "Page Bundles" +keywords : ["page", "bundles"] categories : ["content management", "bundles"] weight : 4001 draft : false toc : true -linktitle : "Page Bundles" --- -Content in "Page Bundles" +A _Page Bundle_ is any directory at any hierarchy within the +`content/` directory, that contains at least an `index.md` file (**not +`_index.md`**). + +{{% note %}} +Here `md` (markdown) is used just as an example. You can use any file +type as a content resource as long as it is a MIME type recognized by +Hugo (`json` files will, as one example, work fine). If you want to +get exotic, you can define your own media type. +{{% /note %}} + + +## Examples of Page Bundle organization {#examples-of-page-bundle-organization} + +```text +content/ +├── page-bundle-1 +│   ├── content1.md +│   ├── content2.md +│   ├── image1.jpg +│   ├── image2.png +│   └── index.md +└── some-section + ├── .. + ├── .. + └── page-bundle-2 + └── index.md +``` + +In the above example `content/` directory, there are two page bundles: + +`page-bundle-1` +: This page bundle has the `index.md`, two other + content Markdown files and two image files. + +`page-bundle-2` +: This page bundle is nested in a section. This + bundle has only the `index.md`. + +{{% note %}} +The hierarchy depth at which a page bundle is created does not matter, +as long as it's not inside another **page** bundle. +{{% /note %}} + + +## TODO Headless Page Bundle {#headless-page-bundle} diff --git a/content/content-management/bundles/section-bundles/index.md b/content/content-management/bundles/section-bundles/index.md index 7bbbd2ba1..89f9cd4a6 100644 --- a/content/content-management/bundles/section-bundles/index.md +++ b/content/content-management/bundles/section-bundles/index.md @@ -1,13 +1,56 @@ --- title : "Section Bundles" -description : "Organization of sections and branches as bundles" -date : 2018-01-24T13:10:00-05:00 -lastmod : 2018-01-24T13:45:07-05:00 +description : "Organization of sections as bundles" +lastmod : 2018-01-25T16:39:52-05:00 +linktitle : "Section Bundles" +keywords : ["section", "bundles"] categories : ["content management", "bundles"] weight : 4002 draft : false toc : true -linktitle : "Section Bundles" --- -Content in "Section Bundles" +A _Section Bundle_ is any directory at any hierarchy within the +`content/` directory, that contains at least an `_index.md` file (**not +`index.md`**). This `_index.md` can also be directly under the +`content/` directory. + +{{% note %}} +Here `md` (markdown) is used just as an example. You can use any file +type as a content resource as long as it is a MIME type recognized by +Hugo (`json` files will, as one example, work fine). If you want to +get exotic, you can define your own media type. +{{% /note %}} + + +## Examples of Section Bundle organization {#examples-of-section-bundle-organization} + +```text +content/ +├── section-bundle-1 +│   ├── section-content1.md +│   ├── section-content2.md +│   ├── image1.jpg +│   ├── image2.png +│   └── _index.md +└── section-bundle-2 + ├── _index.md + └── page-bundle-1 + └── index.md +``` + +In the above example `content/` directory, there are two section +bundles (and a page bundle): + +`section-bundle-1` +: This section bundle has the `_index.md`, two + other content Markdown files and two image files. + +`section-bundle-2` +: This section bundle has the `_index.md` and a + nested page bundle. + +{{% note %}} +The hierarchy depth at which a section bundle is created does not matter, +as long as it's not inside another **section** bundle. +{{% /note %}} diff --git a/themes/gohugoioTheme/layouts/_default/list.html b/themes/gohugoioTheme/layouts/_default/list.html index a0835342a..e6058bb28 100755 --- a/themes/gohugoioTheme/layouts/_default/list.html +++ b/themes/gohugoioTheme/layouts/_default/list.html @@ -1,4 +1,4 @@ {{ define "main" }} - {{ $section_to_display := .Sections | default .Paginator.Pages }} + {{ $section_to_display := .Sections | union .Paginator.Pages }} {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} {{ end }}