diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-23 16:24:44 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-07-23 16:24:44 +0530 |
| commit | 8356e48e4792cb26f6349482111036908dcbc38f (patch) | |
| tree | 037365e53043e5f1f277335398808b44d9dc05b3 /layouts/_default | |
| parent | fe986eb333d86ce3a42365c972505b95daa3a950 (diff) | |
Add option to use 1st entry as some Information
Currenty supports 2 vals Title and Content
Great for short intro for bloggers
can be enabled by using `Params.homeInfoParams`
homeInfoParams:
enabled: true
Title: Hi there 👋
Content: This is Content !! Can be Info, links, social-icons...
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/_default/index.html b/layouts/_default/index.html index c47f81c..3b1284b 100644 --- a/layouts/_default/index.html +++ b/layouts/_default/index.html @@ -8,10 +8,14 @@ {{ end }} {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} +{{- if (and $.IsHome (eq $.Site.Params.homeInfoParams.enabled true)) }} +{{- partial "homeInfo.html" . }} +{{ end }} + {{- range $index, $page := $paginator.Pages }} {{- $class := "post-entry" }} -{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (ne $.Site.Params.homeInfoParams.enabled true)) }} {{- $class = "first-entry" }} {{- else if .Data.Term }} {{- $class = "post-entry tag-entry" }} |
