My font matter has a variable called “featured” which is a boolean.
I am trying to create a custom page which lists with all pages which are featured.
This is not a post, section, taxonomy. how can a custom page be created?
My font matter has a variable called “featured” which is a boolean.
I am trying to create a custom page which lists with all pages which are featured.
This is not a post, section, taxonomy. how can a custom page be created?
content/featured-page.md
or wherever. This will render a page at yoursite.com/featured-page/
.layout: custom-layout
. This will look for a custom template layout called custom-layout.html
instead of using the default single.html
.layouts/_default/custom-layout.html
. This is the layout template file that the page above will use to output the page.Another question. How do I find all the pages which have featured set to true?
Use where
:
{{ range where .Site.RegularPages ".Params.featured" true }}