-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example on setting Hugo section in a parent subtree
- Loading branch information
1 parent
8068f34
commit c567f0c
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ define "main" }} | ||
|
||
<div class="article"> | ||
<h1 class="article-title">{{ .Title }}</h1> | ||
{{ .Content }} | ||
</div> | ||
|
||
{{ end }} |