[new option] notAllowedTypesInHomeFeed
This commit is contained in:
parent
3228b4eae4
commit
3639584f9e
|
@ -239,6 +239,7 @@ themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select optio
|
|||
notAllowedTypesInHome = ["contact", "talks", "about", "showcase"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
||||
notAllowedTypesInHomeSidebar = ["about", "archive", "showcase"] # not allowed page types in home page sidebar(recent post titles).
|
||||
notAllowedTypesInArchive = ["about", "talks", "showcase"] # not allowed page types in archive page
|
||||
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]
|
||||
|
||||
# header
|
||||
homeHeaderType = "text" # text, img, slide
|
||||
|
|
|
@ -247,6 +247,7 @@ themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"] # select optio
|
|||
notAllowedTypesInHome = ["contact", "talks", "about", "showcase"] # not allowed page types in home page. type can be set in front matter or default to folder name.
|
||||
notAllowedTypesInHomeSidebar = ["about", "archive", "showcase"] # not allowed page types in home page sidebar(recent post titles).
|
||||
notAllowedTypesInArchive = ["about", "talks", "showcase"] # not allowed page types in archive page
|
||||
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]
|
||||
|
||||
# header
|
||||
homeHeaderType = "text" # text, img, slide
|
||||
|
|
|
@ -9,6 +9,7 @@ themeOptions = ["dark", "light", "hacker", "solarized", "kimbie"]
|
|||
notAllowedTypesInHome = ["contact", "talks", "about", "showcase", "publication", "presentation", "resume"]
|
||||
notAllowedTypesInHomeSidebar = ["about", "archive", "showcase", "publication", "presentation", "resume"]
|
||||
notAllowedTypesInArchive = ["about", "talks", "showcase", "publication", "presentation", "resume"]
|
||||
notAllowedTypesInHomeFeed = ["about", "archive", "contact", "talks", "showcase", "publication", "presentation", "resume", "gallery"]
|
||||
|
||||
# header
|
||||
homeHeaderType = "text" # text, img, slide
|
||||
|
|
|
@ -15,7 +15,13 @@
|
|||
{{ end }}
|
||||
|
||||
{{ if .IsHome }}
|
||||
{{ range .Site.RegularPages }}
|
||||
|
||||
{{ $filteredPages := .Site.RegularPages }}
|
||||
{{ range $.Param "notAllowedTypesInHomeFeed" }}
|
||||
{{ $filteredPages = (where $filteredPages "Type" "!=" (lower .)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $filteredPages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
|
@ -25,7 +31,9 @@
|
|||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
|
||||
{{ range .Pages }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
|
@ -36,6 +44,7 @@
|
|||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue