-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: showcase page layout using
type
frontmatter #891
- Loading branch information
Showing
4 changed files
with
28 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
+++ | ||
title = "{{ replace .Name "-" " " | title }}" | ||
type = "chapter-overview" | ||
weight = 1 | ||
+++ | ||
|
||
This is a new chapter. |
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,19 @@ | ||
|
||
<article class="chapter narrow"> | ||
<header class="headline"> | ||
{{- partial "content-header.html" . }} | ||
</header> | ||
{{ partial "heading-pre.html" . }}<div class="article-subheading">{{ T "Chapter" .Params.Weight }}</div> | ||
{{ partial "heading.html" . }}{{ partial "heading-post.html" . }} | ||
|
||
{{ partial "article-content.html" . }} | ||
{{ partial "shortcodes/children.html" (dict | ||
"page" . | ||
"containerstyle" "div" | ||
"style" "h2" | ||
"description" "true" | ||
)}} | ||
<footer class="footline"> | ||
{{- partial "content-footer.html" . }} | ||
</footer> | ||
</article> |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{{ if (eq .Type "chapter") }}<b style="display: inline-block; font-weight: 200; padding-left: .3rem; text-align: left; width: 1.1rem;">{{ .Params.weight }}.</b> {{ end }} | ||
{{ if (or (eq .Type "chapter") (eq .Type "chapter-overview")) }}<b style="display: inline-block; font-weight: 200; padding-left: .3rem; text-align: left; width: 1.1rem;">{{ .Params.weight }}.</b> {{ end }} |