From ecfa3cd2c80045ba3ddda579ea01395c256669fb Mon Sep 17 00:00:00 2001 From: Saul Badillo Date: Fri, 17 Nov 2023 21:00:46 -0600 Subject: [PATCH] Add support to add blog entries on index --- layouts/index.html | 4 +++- layouts/partials/blog.html | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/blog.html diff --git a/layouts/index.html b/layouts/index.html index 59be48f..2d11aef 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,10 +4,12 @@ {{ partial "counter.html" . }} +{{ partial "blog.html" . }} + {{ partial "portfolio.html" . }} {{ partial "testimonial.html" . }} {{ partial "call-to-action.html" . }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/blog.html b/layouts/partials/blog.html new file mode 100644 index 0000000..c21d5c2 --- /dev/null +++ b/layouts/partials/blog.html @@ -0,0 +1,33 @@ +{{ with .Site.Params.Blog }} + {{ if .enable }} +
+
+
+
+
+

{{ .title }}

+

{{ .subtitle }}

+
+
+ {{ range first 4 (where $.Site.RegularPages "Type" "blog") }} +
+
+
+ project-thumb +
+
+ {{ delimit .Params.category ", " }} +

{{ .Title }}

+ {{ .Site.Params.blog.view_entry }} +
+
+
+ {{ end }} + +
+
+
+ {{ end }} +{{ end }}