mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 12:34:54 -04:00
Add rough draft for page and section bundles
- Also a table showing the main differences between page and section bundles on in Bundles section content. - Minor update of description in front-matter. - Update default `list.html` layout as a quick-fix for the issue explained in https://github.com/gohugoio/hugoDocs/issues/308#issuecomment-360235461
This commit is contained in:
parent
a0e44458fb
commit
6bc3ced13e
@ -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 |
|
||||
|
@ -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.
|
||||
|
@ -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 %}}
|
||||
|
||||
|
||||
## <span class="todo TODO_">TODO </span> Headless Page Bundle {#headless-page-bundle}
|
||||
|
@ -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 %}}
|
||||
|
@ -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 }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user