-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Don't use inline shortcodes; they look messy and are not very reusable - Add a better and proper "getpage" shortcode. Ref #358
- Loading branch information
1 parent
5b3a9c6
commit eaadde8
Showing
7 changed files
with
75 additions
and
85 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
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
17 changes: 17 additions & 0 deletions
17
test/site/content/posts/build-front-matter/do-not-render-or-list.md
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,17 @@ | ||
+++ | ||
title = "_build: Don't render or list this page" | ||
description = "Do not render or list this page." | ||
tags = ["front-matter", "page-bundles", "_build", "dont-render", "dont-list", "headless"] | ||
draft = false | ||
[_build] | ||
render = false | ||
list = false | ||
+++ | ||
|
||
**This is the "do not render or list" page.** | ||
|
||
See the [parent](../) list page -- This page is not rendered, but its content | ||
and metadata can be found using the `site.GetPage` method. | ||
|
||
Setting both `render` and `list` to `false` or `"never"` makes this | ||
page behave like a **headless** page bundle -- [ref](https://github.com/gohugoio/hugo/issues/6412#issuecomment-573446730). |
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 @@ | ||
{{ $page := (.Get 0) }} | ||
{{ with site.GetPage $page }} | ||
<h2 style="color: blue;">"{{ $page }}"</h2> | ||
<h3>Page Metadata</h3> | ||
{{ partial "debugprint" . }} | ||
<h3>Page Params</h3> | ||
{{ partial "debugprint" .Params }} | ||
<h3>Page Content</h3> | ||
<blockquote>{{ .Content }}</blockquote> | ||
{{ end }} |