From ab2d3c6fb5852b6d19011a89f61c8c63f00d3703 Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Wed, 3 Jun 2020 12:27:48 +0530 Subject: [PATCH] Added featured image option --- .../a-tale-of-decision-trees-java-opencl.md | 1 + layouts/partials/list_item.html | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 layouts/partials/list_item.html diff --git a/content/post/a-tale-of-decision-trees-java-opencl.md b/content/post/a-tale-of-decision-trees-java-opencl.md index 784a1a2..9f4200e 100644 --- a/content/post/a-tale-of-decision-trees-java-opencl.md +++ b/content/post/a-tale-of-decision-trees-java-opencl.md @@ -23,6 +23,7 @@ tags = [ opacity = false sidebar = { "disable" = true } +featured_image = "/img/decisiontree.png" +++ I worked on a decision tree program in java for my final year MSc project. In a series of posts such as this one, I'll be highlighting some of the aspects of it's creation and implementation. diff --git a/layouts/partials/list_item.html b/layouts/partials/list_item.html new file mode 100644 index 0000000..c2f3785 --- /dev/null +++ b/layouts/partials/list_item.html @@ -0,0 +1,64 @@ +
+ {{- if .Page.Params.thumbnail -}} +
+
+ + {{ .Title }} + +
+
+ {{- end -}} +
+
+ +

{{ .Page.Title }}

+
+ +
+ {{- with .Page.Params.featured_image }}{{- end -}} + +
+ +

+ {{- with .Page.Description -}} + {{ . | plainify | htmlUnescape | replaceRE "(?m)(\\s+)" " " }} + + [{{ i18n "readMore" ($.Page.Title | title) | safeHTML }}...] + + {{- else -}} + {{ .Page.Summary | plainify | htmlUnescape | replaceRE "(?m)(\\s+)" " " }} + {{ if .Page.Truncated }} + + [{{ i18n "readMore" ($.Page.Title | title) | safeHTML }}...] + + {{ end }} + {{- end -}} +

+
+
+