From ac4d217269a5c953b58885fdb64e36b54e894e8a Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Tue, 31 Jan 2017 04:46:56 -0600 Subject: [PATCH] Add support for Description to blog posts (#147) The proper metadata is also in the archtype for blog now. Signed-off-by: Matt Stratton --- archetypes/blog.md | 6 ++++++ exampleSite/content/blog/2016-chicago.md | 3 ++- layouts/blog/summary.html | 8 +++++++- layouts/partials/footer.html | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 archetypes/blog.md diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 000000000..063919ffe --- /dev/null +++ b/archetypes/blog.md @@ -0,0 +1,6 @@ ++++ +Description = "" +title = "" +Author = "" + ++++ diff --git a/exampleSite/content/blog/2016-chicago.md b/exampleSite/content/blog/2016-chicago.md index 7dc96c492..0592b7047 100644 --- a/exampleSite/content/blog/2016-chicago.md +++ b/exampleSite/content/blog/2016-chicago.md @@ -1,9 +1,10 @@ +++ Categories = [] -Description = "" +Description = "[DevOpsDays Chicago](https://devopsdays.org/events/2016-chicago) took place on August 30th & 31st at Summit West in beautiful downtown Chicago. A sold-out, diverse crowd gathered for keynotes, presentations, lightning talks, and open spaces to learn, discuss, and promote all things DevOps." Tags = [] date = "2016-12-12T16:31:00-06:00" title = "Chicago 2016 in review" +Author = "Matt Stratton" +++ diff --git a/layouts/blog/summary.html b/layouts/blog/summary.html index f11206c4a..6824e7315 100644 --- a/layouts/blog/summary.html +++ b/layouts/blog/summary.html @@ -1,7 +1,13 @@

{{ .Title }}

-{{ .Summary }} +{{ if isset .Params "description" }} + {{ if ne .Params.descripton "" }} + {{ .Params.description | markdownify }} + {{ end }} +{{ else }} + {{ .Summary }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 839bf46ed..4fe3dfdc1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -23,7 +23,13 @@ {{- end -}} {{- end -}}