From be94b5fd052b910d0b3704bea22d26214136f060 Mon Sep 17 00:00:00 2001 From: Bobby Date: Mon, 27 Jan 2020 12:46:37 -0600 Subject: [PATCH] Add an optional featured image (#252) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Make MathJax version 3 work * Change my contributor link * Add an optional featured image and table of contents * Add an optional featured image and table of contents * Add example of a featured image in post along with table of contents * Remove word count criteria * Fix formatting * Add table of contents options * Remove toc feature due to markdown bug * Removing markup configuration Co-authored-by: Luiz F. A. de PrĂ¡ --- exampleSite/content/posts/hugoisforlovers.md | 1 + layouts/posts/single.html | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/exampleSite/content/posts/hugoisforlovers.md b/exampleSite/content/posts/hugoisforlovers.md index ecb53ad..f6a051c 100644 --- a/exampleSite/content/posts/hugoisforlovers.md +++ b/exampleSite/content/posts/hugoisforlovers.md @@ -12,6 +12,7 @@ categories = [ "golang", ] series = ["Getting Started", "Hugo"] +featured_image = "https://imgs.xkcd.com/comics/angular_momentum.jpg" +++ ## Step 1. Install Hugo diff --git a/layouts/posts/single.html b/layouts/posts/single.html index eedb778..1e7d064 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -27,9 +27,13 @@
+ {{ if .Params.featured_image }} + Featured image + {{ end }} {{ .Content }}
+