Skip to content

Commit 897e004

Browse files
committed
archetypes: rethink rendering matcornic#300
1 parent d071d2d commit 897e004

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+336
-212
lines changed

archetypes/chapter.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
+++
2-
chapter = true
3-
menuPre = "<b>X. </b>"
2+
archetype = "chapter"
3+
narrow = true
44
title = "{{ replace .Name "-" " " | title }}"
5-
weight = 5
5+
weight = X
66
+++
77

8-
### Chapter X
9-
10-
# Some Chapter title
11-
128
Lorem Ipsum.

archetypes/default.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title = "{{ replace .Name "-" " " | title }}"
3-
weight = 5
3+
weight = X
44
+++
55

66
Lorem Ipsum.

archetypes/home.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
+++
2+
archetype = "home"
3+
title = "{{ replace .Name "-" " " | title }}"
4+
++
5+
6+
Lorem Ipsum.

exampleSite/content/_index.en.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
+++
2+
archetype = "home"
23
title = "Hugo Relearn Theme"
34
+++
45

5-
# Hugo Relearn Theme
6-
76
The [Relearn theme](http://github.com/McShelby/hugo-theme-relearn) is a theme for [Hugo](https://gohugo.io/), a static website generator written in Go. Where Hugo is often used for blogs, this theme is designed with documentation in mind.
87

98
{{% notice info %}}

exampleSite/content/_index.pir.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
+++
2+
archetype = "home"
23
title = "Cap'n Hugo Relearrrn Theme"
34
+++
45
{{< piratify >}}
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
+++
2-
chapter = true
2+
archetype = "chapter"
3+
narrow = true
34
title = "Basics"
45
weight = 1
56
+++
67

7-
### Chapter 1
8-
9-
# Basics
10-
118
Discover what this Hugo theme is all about and the core-concepts behind it.

exampleSite/content/basics/_index.pir.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
+++
2-
chapter = true
2+
archetype = "chapter"
3+
narrow = true
34
title = "Basics"
45
weight = 1
56
+++

exampleSite/content/basics/migration/_index.en.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,16 @@ This document shows you what's new in the latest release. For a detailed list of
1414

1515
---
1616

17-
## 4.3.0
17+
## 5.0.0
1818

19-
- **Change**: Renaming the frontmatter options `pre` / `post` to `menuPre` / `menuPost`. The old options will still be used if the new options aren't set. Therefore you don't need to change anything after the upgrade.
19+
- **Change**: The way [archetypes]({{% relref "cont/archetypes" %}}) are used to generate output has changed. Your existing content files will still work like before and therefore you don't need to change anything after the upgrade.
20+
21+
Nevertheless, it is recommended to adapt your existing files to the new way.
22+
23+
- for your home page, add the frontmatter parameter `archetype = "home"`
24+
- for all files having the old frontmatter parameter `chapter = true`, replace that parameter with `archetype = "chapter"`
25+
26+
- **Change**: The frontmatter options `pre` / `post` were renamed to `menuPre` / `menuPost`. The old options will still be used if the new options aren't set. Therefore you don't need to change anything after the upgrade.
2027

2128
- **New**: Adding new partials `heading-pre.html` / `heading-post.html` and according frontmatter options `headingPre` / `headingPost` to modifiy the way your page`s main heading gets styled.
2229

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
+++
2-
chapter = true
2+
archetype = "chapter"
3+
narrow = true
34
title = "Content"
45
weight = 2
56
+++
67

7-
### Chapter 2
8-
9-
# Content
10-
118
Find out how to create and organize your content quickly and intuitively.

exampleSite/content/cont/_index.pir.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
+++
2-
chapter = true
2+
archetype = "chapter"
3+
narrow = true
34
title = "Rambl'n"
45
weight = 2
56
+++

0 commit comments

Comments
 (0)