Single Post with YAML front matter
tags: single yaml cross-link
Description/Summary
This is a single post. You do not need to set the EXPORT_FILE_NAME property in here. But then you also lose the tag and property inheritance, TODO state, etc. Org awesomeness. This file will export the front-matter in YAML (because #+hugo_front_matter_format: yaml). See /singles/post-toml/ that exports that in TOML. Here’s the same link with description: Post exported with TOML front-matter. Here’s an example with relative link to an Org file: /images-in-content/post4/.
Content
This is a single post. You do not need to set the EXPORT_FILE_NAME
property in here. But then you also lose the tag and property
inheritance, TODO state, etc. Org awesomeness.
This file will export the front-matter in YAML (because
#+hugo_front_matter_format: yaml
). See /singles/post-toml/ that
exports that in TOML.
Here’s the same link with description: Post exported with TOML front-matter.
Here’s an example with relative link to an Org file: /images-in-content/post4/.
All of the above linked Org files have to export posts using
per-file flow, and they cannot be page bundles or have slugs — See
ox-hugo
Issue #131 for requirements for this basic cross-linking to
work as expected.
First heading in this post #
This is a under first heading.
Second heading in this post #
This is a under second heading.
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | "Single Post with YAML front matter" | |
Title | "Single Post with YAML front matter" | |
ResourceType | "page" | |
Kind | "page" | |
Section | "singles" | |
Draft | false | |
Type | "singles" | |
Layout | "" | |
Permalink | "https://ox-hugo.scripter.co/test/singles/post-yaml/" | |
RelPermalink | "/singles/post-yaml/" | |
Data |
| |
NextPage | Single Post with TOML front matter | |
PrevPage | Single Post, but draft | |
NextInSection | Single Post with TOML front matter | |
PrevInSection | Single Post, but draft |
Page Params (Debug)
Key | Type | Value | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
categories | []string | "cat1" "cat2" | ||||||||||||||||||
date | time.Time | 2017-07-20 00:00:00 +0000 UTC | ||||||||||||||||||
draft | bool | false | ||||||||||||||||||
iscjklanguage | bool | false | ||||||||||||||||||
lastmod | time.Time | 2018-06-01 15:32:29 -0400 -0400 | ||||||||||||||||||
menu | maps.Params |
| ||||||||||||||||||
publishdate | time.Time | 2017-07-20 00:00:00 +0000 UTC | ||||||||||||||||||
tags | []string | "single" "yaml" "cross-link" | ||||||||||||||||||
title | string | "Single Post with YAML front matter" |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "f6d1d98088f259e194df5984ca28ef06" |
BaseFileName | "post-yaml" |
TranslationBaseName | "post-yaml" |
Lang | "en" |
Section | "singles" |
LogicalName | "post-yaml.md" |
Dir | "singles/" |
Ext | "md" |
Path | "singles/post-yaml.md" |