.Kind (page): .Type (bundles) / .Layout ()
Bundle: leaf
[ 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 Mar 05, 2024 19:24 UTC.


This page was created/modified in commit 1376362 "feat: Now cross-posting links to other page bundle subtrees works" on 2022-03-16.
Markdown source of this page

Page Bundle A

tags: page-bundles leaf-bundle


Description/Summary

Index page of Page Bundle A. Link to Leaf Bundle B Link to Branch Bundle C Link to images not in the current directory # Source path contains /static/ # When path contains /static/, the path translations are the exact same as those for non-bundle cases. More details Source path contains the bundle name # See this other test for examples. Inside <ORG_FILE_DIR> Copied-to location inside BUNDLE Explanation <ORG_FILE_DIR>/bar/<BUNDLE>/baz/foo.png <HUGO_BASE_DIR>/content/<SECTION>/<BUNDLE>/baz/foo.png If the file directory path contains "/<BUNDLE>/", the directory structure following that "/<BUNDLE>/" is preserved.


Content

Index page of Page Bundle A.

Source path contains /static/ #

When path contains /static/, the path translations are the exact same as those for non-bundle cases.

More details

Source path contains the bundle name #

See this other test for examples.

Inside <ORG_FILE_DIR> Copied-to location inside BUNDLE Explanation
<ORG_FILE_DIR>/bar/<BUNDLE>/baz/foo.png <HUGO_BASE_DIR>/content/<SECTION>/<BUNDLE>/baz/foo.png If the file directory path contains "/<BUNDLE>/", the directory structure following that "/<BUNDLE>/" is preserved.

Special case: Home page branch bundle #

In this case, both HUGO_SECTION and HUGO_BUNDLE values will be /.

So the images to be copied to the home page branch bundle i.e. the content/ dir must be placed in a special _home/ directory. Here are some examples:

Inside <ORG_FILE_DIR> Copied-to location inside BUNDLE Explanation
<ORG_FILE_DIR>/bar/_home/baz/foo.png <HUGO_BASE_DIR>/content/baz/foo.png If the page is the home page branch bundle, and the file directory path contains "/_home/", the directory structure following that "/_home/" is preserved.
<ORG_FILE_DIR>/bar/_home/foo.png <HUGO_BASE_DIR>/content/foo.png

Source path contains neither /static/ nor the bundle name #

Outside static Copied-to location inside BUNDLE Explanation
~/temp/bar/baz/foo.png <HUGO_BASE_DIR>/content/<SECTION>/<BUNDLE>/foo.png Here, as the outside path does not have /static/, the file is copied directly to the BUNDLE dir.

Same image, but hyperlinked #

Page Bundles with images in the same dir as content Org file #

Inside <ORG_FILE_DIR> Copied-to location inside BUNDLE Explanation
<ORG_FILE_DIR>/bar/baz/foo.png <HUGO_BASE_DIR>/content/<SECTION>/<BUNDLE>/bar/baz/foo.png Even if the outside path does not have /static/, it is still inside the same dir as the Org file, so the directory structure is preserved.

See this other test for an example.


Resources


Bundled Sub-pages

Bundled page bar

“Bar” page in Page Bundle A.

Bundled page foo

“Foo” page in Page Bundle A.


Page (Debug)

Page VariableValue
Name "Page Bundle A"
Title "Page Bundle A"
ResourceType "page"
Kind "page"
Section "bundles"
Draft false
Type "bundles"
Layout ""
Permalink "https://ox-hugo.scripter.co/test/bundles/page-bundle-a/"
RelPermalink "/bundles/page-bundle-a/"
Data
page.Data{} (type:page.Data)
NextPagePage Bundle (File-based Flow)
PrevPagePage Bundle B
NextInSectionNone
PrevInSectionPage Bundle B

Page Params (Debug)

KeyTypeValue
draftbool false
iscjklanguagebool false
lastmodtime.Time 2022-03-16 12:20:33 -0400 -0400
resources[]map[string]interface {}
KeyTypeValue
srcstring "images/copy-of-*.png"
titlestring "First copy of Org mode logo"
KeyTypeValue
srcstring "copy-2-*.png"
titlestring "Second copy of Org mode logo"
tags[]string "page-bundles" "leaf-bundle"
titlestring "Page Bundle A"

Resources (Debug)

Resource VariableValue
Name "copy-2-of-unicorn-logo.png"
Title "Second copy of Org mode logo"
ResourceType "image"
Permalink "https://ox-hugo.scripter.co/test/bundles/page-bundle-a/copy-2-of-unicorn-logo.png"
RelPermalink "/bundles/page-bundle-a/copy-2-of-unicorn-logo.png"
Params
Page VariableValue
Name "bar.md"
Title "Bundled page bar"
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"
ResourceType "page"
Kind "page"
Section "bundles"
Draft false
Type "bundles"
Layout ""
Permalink ""
RelPermalink ""
Data
page.Data{} (type:page.Data)
NextPageNone
PrevPageNone
NextInSectionNone
PrevInSectionNone

File Object (Debug)

FileInfo VariableValue
UniqueID "d841f57bec9a59958ec293d0e1c2929b"
BaseFileName "index"
TranslationBaseName "index"
Lang "en"
Section "bundles"
LogicalName "index.md"
Dir "bundles/page-bundle-a/"
Ext "md"
Path "bundles/page-bundle-a/index.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]