diff --git a/exampleSite/config.toml b/exampleSite/config.toml index bec37f5..0a19073 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -9,6 +9,20 @@ paginate = 5 showMenuItems = 2 fullWidthTheme = false centerTheme = false + # singlePageSite moves pages from the main nav menu to sections on the homepage. + # These only menu items with a url set to "/#section-name" will be displayed. + # A collection is displayed for the menu identifier which matches contentTypeName. + # The collection items use the "post" archetypes. + singlePageSite = true + # For singlePageSites the collection is paginated but it would not make sense to + # paginate in the middle of a section, so a link to see more can be specified below. + singlePageCollectionSeeMoreText = "Check out my projects!" + singlePageCollectionSeeMoreLink = "/portfolio" + +[params.twitter] + creator = "@justinnuwin" + site = "@justinnuwin" + [languages] [languages.en] diff --git a/layouts/_default/index.html b/layouts/_default/index.html index d0a9836..924d824 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -6,33 +6,35 @@ {{ end }} -{{ if .Site.Params.singlePageSite }} + +{{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} +{{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} - - {{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} - {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} +{{ $PageContext := . }} +{{ if .IsHome }} + {{ $PageContext = .Site }} +{{ end }} +{{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} - {{ $PageContext := . }} - {{ if .IsHome }} - {{ $PageContext = .Site }} - {{ end }} - {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} - -