Skip to content

Commit

Permalink
added a new front matter keyword 'on_homepage' to list a page on the …
Browse files Browse the repository at this point in the history
…main page
  • Loading branch information
MaxGandyra committed Mar 7, 2024
1 parent cd7b2ad commit a342512
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pygmentsCodefencesGuessSyntax = true
[Params]
homeTitle = "Our virtual research and training building for cognition-enabled robotics" # Set a different text for the header on the home page
subtitle = ""
mainSections = ["posts"]
mainSections = ["page"]
logo = "img/logo.png" # Expecting square dimensions
favicon = "favicon.ico"
dateFormat = "2 January 2006"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dropCap: false
displayInMenu: false
displayInList: true
draft: false
order: 1
on_homepage: true
resources:
- name: ActionButtons
src: "buttons.json"
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{ end }}

<div class="posts-list">
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
{{ $pag := .Paginate (where (where site.RegularPages "Type" "in" site.Params.mainSections) "Params.on_homepage" true) }}
{{ range $pag.Pages }}
{{ partial "post_preview" . }}
{{ end }}
Expand Down

0 comments on commit a342512

Please sign in to comment.