diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 924a8a7..987cbac 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -31,6 +31,13 @@ params: # gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master # gitFileIcon: github-circle + # display a "Latest Posts" section on the homepage below its content + homepageLatestPosts: true + + # footer: >- + # Some example text for the footer. + + # see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings # you probably want to keep this default privacy: diff --git a/i18n/en.yaml b/i18n/en.yaml index f117772..d967df9 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -8,6 +8,9 @@ table_of_contents: browser_no_video_support: other: "Your browser does not support video." +latest_posts: + other: "Latest Posts" + # Meta items long_date: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 881c11c..d66471f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -16,7 +16,7 @@
{{ block "main" . }} - {{ .Content }} + THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) {{ end }}
diff --git a/layouts/index.html b/layouts/index.html index e4e4a83..ce2e79f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,2 +1,29 @@ {{ define "main" }} + {{ with .Content }} + {{ . }} + {{ end }} + + {{ if .Site.Params.homepageLatestPosts }} +
+

+ {{ i18n "latest_posts" }} + {{ partial "rss-link.html" . }} +

+ + {{ with (.Paginate .Site.RegularPages).Pages }} +
+ +
+ {{ else }} +
+ {{ i18n "no_posts" }} +
+ {{ end }} + + {{ partial "pagination.html" . }} + {{ end }} {{ end }}