diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-22 16:47:07 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2023-05-22 16:47:07 +0200 |
commit | b95e15694006a16eee41024be88615bda62041cf (patch) | |
tree | 3f880d5bc78eaed5b549a50c6cdd219d57e3ac83 /docs/content/en/content-management/build-options.md | |
parent | 4cac5f5e306b6c301258eb9936094eb910264c9a (diff) | |
parent | f96384a3b596f9bc0a3a035970b09b2c601f0ccb (diff) |
Merge commit 'f96384a3b596f9bc0a3a035970b09b2c601f0ccb'
Diffstat (limited to 'docs/content/en/content-management/build-options.md')
-rw-r--r-- | docs/content/en/content-management/build-options.md | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/docs/content/en/content-management/build-options.md b/docs/content/en/content-management/build-options.md index f798754f1..4798f9b2b 100644 --- a/docs/content/en/content-management/build-options.md +++ b/docs/content/en/content-management/build-options.md @@ -56,43 +56,39 @@ If true, the page will be treated as part of the project's collections and, when #### publishResources -If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published. +If set to true the [Bundle's Resources](/content-management/page-bundles) will be published. Setting this to false will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others. {{% note %}} -Any page, regardless of their build options, will always be available using the [`.GetPage`]({{< relref "functions/GetPage" >}}) methods. +Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/getpage) methods. {{% /note %}} ------- - ### Illustrative use cases #### Not publishing a page Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else. -```yaml -# content/who-we-are.md` +{{< code-toggle file="content/who-we-are.md" fm=true copy=false >}} title: Who we are _build: list: false render: false -``` +{{< /code-toggle >}} -```go-html-template -{{/* layouts/index.html */}} +{{< code file="layouts/index.html" copy=false >}} <section id="who-we-are"> -{{ with site.GetPage "who-we-are" }} - {{ .Content }} -{{ end }} + {{ with site.GetPage "who-we-are" }} + {{ .Content }} + {{ end }} </section> -``` +{{< /code >}} #### Listing pages without publishing them Website needs to showcase a few of the hundred "testimonials" available as content files without publishing any of them. -To avoid setting the build options on every testimonials, one can use [`cascade`]({{< relref "/content-management/front-matter#front-matter-cascade" >}}) on the testimonial section's content file. +To avoid setting the build options on every testimonials, one can use [`cascade`](/content-management/front-matter#front-matter-cascade) on the testimonial section's content file. {{< code-toggle >}} title: Testimonials @@ -104,12 +100,12 @@ cascade: list: true # default {{< /code-toggle >}} -```go-html-template -{{/* layouts/_defaults/testimonials.html */}} +{{< code file="layouts/_defaults/testimonials.html" copy=false >}} <section id="testimonials"> -{{ range first 5 .Pages }} - <blockquote cite="{{ .Params.cite }}"> - {{ .Content }} - </blockquote> -{{ end }} + {{ range first 5 .Pages }} + <blockquote cite="{{ .Params.cite }}"> + {{ .Content }} + </blockquote> + {{ end }} </section> +{{< /code >}} |