Add example on setting Hugo section in a parent subtree

Closes https://github.com/kaushalmodi/ox-hugo/issues/31

This feature was enabled by adding property inheritance support in
1a0d26ca22
master
Kaushal Modi 9 years ago
parent 8068f34ab7
commit c567f0cd6e
  1. 20
      example-site/content-org/all-posts.org
  2. 10
      example-site/content/articles/article-1.md
  3. 10
      example-site/content/articles/article-2.md
  4. 8
      example-site/themes/bare_min/layouts/articles/single.html

@ -295,6 +295,26 @@ Here the front matter format is set to YAML using the
=HUGO_FRONT_MATTER_FORMAT= key in property drawer.
Here there is white space in menu name property.
* Articles
:PROPERTIES:
:EXPORT_HUGO_SECTION: articles
:END:
** Article 1
:PROPERTIES:
:EXPORT_FILE_NAME: article-1
:END:
First article.
This will land in =content/articles/= as the parent of this subtree
sets =EXPORT_HUGO_SECTION= to =articles=. Note that the theme needs to
define at least the =single.html= for =articles/=.
** Article 2
:PROPERTIES:
:EXPORT_FILE_NAME: article-2
:END:
Second article.
This will also land in =content/articles/= the same way.
* TODO Pre-Draft State
:PROPERTIES:
:EXPORT_FILE_NAME: draft-state-todo

@ -0,0 +1,10 @@
+++
title = "Article 1"
date = 2017-07-19T08:34:29-04:00
tags = []
draft = false
+++
First article.
This will land in `content/articles/` as the parent of this subtree sets `EXPORT_HUGO_SECTION` to `articles`. Note that the theme needs to define at least the `single.html` for `articles/`.

@ -0,0 +1,10 @@
+++
title = "Article 2"
date = 2017-07-19T08:34:22-04:00
tags = []
draft = false
+++
Second article.
This will also land in `content/articles/` the same way.

@ -0,0 +1,8 @@
{{ define "main" }}
<div class="article">
<h1 class="article-title">{{ .Title }}</h1>
{{ .Content }}
</div>
{{ end }}
Loading…
Cancel
Save