.Kind (page): .Type (posts) / .Layout (headless-bundle-single)
Bundle: n/a (regular page)
[ categories | tags | search ]
ox-hugo Test Site

This is the test site for the ox-hugo package for Emacs/Org-mode.

It is updated automatically after each commit to the ox-hugo repo. It was last updated on Oct 05, 2024 21:20 UTC.


This page was created/modified in commit c5b31bd "Change default branch to 'main'" on 2021-12-14.
Markdown source of this page

Page using the Headless Page Bundle X

tags: page-bundles headless layout

Layout file: headless-bundle-single.html

This is a regular page. Below content is fetched from the headless page bundle headless-page-bundle-x.


Content from Headless Bundle Index page

Headless Page Bundle Index Page

This is a headless page bundle. This feature was introduced in this commit, and available in Hugo v0.35+.

As this bundle is headless, the index page of this bundle (this page!) will not be published anywhere:

But you can get it by .Site.GetPage .... Here is an example (ref):

{{ $headless := .Site.GetPage "page" "some-headless-page" }}
{{ $reusablePages := $headless.Resources.Match "sidebar-content*" }}
{{ range $reusablePages }}
    {{ .Title }}
{{ end }}

There are many use cases of such headless page bundles:

Headless Bundle Index Page Params (Debug)

KeyTypeValue
draftbool false
headlessbool true
iscjklanguagebool false
lastmodtime.Time 2018-03-14 14:27:58 -0400 -0400
tags[]string "page-bundles" "headless"
titlestring "Headless Page Bundle Index Page"

Content from Headless Bundle page Resources

Bundled page bar in the headless bundle

“Bar” page in Headless Page Bundle.


Bundled page foo in the headless bundle

“Foo” page in Headless Page Bundle.


Bundled page zoo in the headless bundle

“Zoo” page in Headless Page Bundle.


Headless Bundle Resources (Debug)

Page VariableValue
Name "bar.md"
Title "Bundled page bar in the headless bundle"
ResourceType "page"
Kind "page"
Section "bundles"
Draft false
Type "bundles"
Layout ""
Permalink ""
RelPermalink ""
Data
page.Data{} (type:page.Data)
NextPageNone
PrevPageNone
NextInSectionNone
PrevInSectionNone
Page VariableValue
Name "foo.md"
Title "Bundled page foo in the headless bundle"
ResourceType "page"
Kind "page"
Section "bundles"
Draft false
Type "bundles"
Layout ""
Permalink ""
RelPermalink ""
Data
page.Data{} (type:page.Data)
NextPageNone
PrevPageNone
NextInSectionNone
PrevInSectionNone
Page VariableValue
Name "zoo.md"
Title "Bundled page zoo in the headless bundle"
ResourceType "page"
Kind "page"
Section "bundles"
Draft false
Type "bundles"
Layout ""
Permalink ""
RelPermalink ""
Data
page.Data{} (type:page.Data)
NextPageNone
PrevPageNone
NextInSectionNone
PrevInSectionNone

Page (Debug)

Page VariableValue
Name "Page using the Headless Page Bundle X"
Title "Page using the Headless Page Bundle X"
ResourceType "page"
Kind "page"
Section "posts"
Draft false
Type "posts"
Layout "headless-bundle-single"
Permalink "https://ox-hugo.scripter.co/test/posts/page-using-headless-page-bundle/"
RelPermalink "/posts/page-using-headless-page-bundle/"
Data
page.Data{} (type:page.Data)
NextPagePage Bundle with images in the same dir
PrevPagePaired shortcodes using special blocks (Named Arguments)
NextInSectionOverriding Org-style tags
PrevInSectionPaired shortcodes using special blocks (Named Arguments)

Page Params (Debug)

KeyTypeValue
draftbool false
iscjklanguagebool false
lastmodtime.Time 2021-12-14 15:26:44 -0500 -0500
layoutstring "headless-bundle-single"
tags[]string "page-bundles" "headless" "layout"
titlestring "Page using the Headless Page Bundle X"

File Object (Debug)

FileInfo VariableValue
UniqueID "dab0f5a61d0cd9b1f992bb21b3000032"
BaseFileName "page-using-headless-page-bundle"
TranslationBaseName "page-using-headless-page-bundle"
Lang "en"
Section "posts"
LogicalName "page-using-headless-page-bundle.md"
Dir "posts/"
Ext "md"
Path "posts/page-using-headless-page-bundle.md"

This site is generated using the ox-hugo package for Emacs/Org-mode + hugo-bare-min-theme + Hugo 0.101.0 (commit 466fa43c16709b4483689930a4f9ac8add5c9f66) . This site is powered by Netlify.
[Test Site home | ox-hugo home]