From 9b222b3abf1c60279c8fe6433fec450c70d13e69 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Fri, 1 Jan 2021 17:58:08 -0600 Subject: Create skeleton of blog feature (#310) Co-authored-by: Chris Reddington Co-authored-by: Matt Stratton Co-authored-by: Chris Reddington <791642+chrisreddington@users.noreply.github.com> --- REFERENCE.md | 48 +++++++ archetypes/blog.md | 11 ++ exampleSite/config.toml | 5 + exampleSite/content/blog/my-first-blog.md | 25 ++++ exampleSite/content/blog/my-fourth-blog.md | 24 ++++ exampleSite/content/blog/my-second-blog.md | 24 ++++ exampleSite/content/blog/my-third-blog.md | 24 ++++ layouts/blog/single.html | 45 ++++++ layouts/blog/summary.html | 20 +++ layouts/partials/author.html | 6 + layouts/partials/blog-metadata.html | 14 ++ layouts/partials/grid-blog.html | 117 ++++++++++++++++ layouts/partials/head_includes.html | 14 +- layouts/partials/jumbotron.html | 10 +- layouts/partials/row-blog.html | 214 +++++++++++++++++++++++++++++ layouts/section/blog.html | 11 ++ layouts/section/blog.rss.xml | 24 ++++ 17 files changed, 629 insertions(+), 7 deletions(-) create mode 100644 archetypes/blog.md create mode 100644 exampleSite/content/blog/my-first-blog.md create mode 100644 exampleSite/content/blog/my-fourth-blog.md create mode 100644 exampleSite/content/blog/my-second-blog.md create mode 100644 exampleSite/content/blog/my-third-blog.md create mode 100644 layouts/blog/single.html create mode 100644 layouts/blog/summary.html create mode 100644 layouts/partials/author.html create mode 100644 layouts/partials/blog-metadata.html create mode 100644 layouts/partials/grid-blog.html create mode 100644 layouts/partials/row-blog.html create mode 100644 layouts/section/blog.html create mode 100644 layouts/section/blog.rss.xml diff --git a/REFERENCE.md b/REFERENCE.md index 5368e90..db660c5 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -18,6 +18,7 @@ - [Taxonomies](#taxonomies) - [Menus](#menus) - [Podlove Subscribe Button](#podlove-subscribe-button) +- [Blogs](#blogs) - [Episodes](#episodes) - [Upcoming Episodes](#upcoming-episodes) - [Guests](#guests) @@ -266,6 +267,53 @@ To customize your button please add the following section to your `config.toml`, subscribe_feed_format = "mp3" # options: mp3, aac, ogg, opus ``` +## Blogs + +Every blogs requires a page in the `content/blog` on your site. The command `hugo new blog/myblog.md` should populate it properly. + +A blog file takes the following structure: + +``` ++++ +Description = "Another blog post!" +Date = 2020-11-12T13:33:18-06:00 +PublishDate = 2020-11-12T13:33:18-06:00 # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "My second blog" +images = ["img/episode/default-social.jpg"] +blog_image = "img/episode/default.jpg" +Author = "Chris Reddington" +categories = ["DevOps", "Release"] +tags = ["Ring Deployment", "Phased Rollout"] +series = ["The Nirvana of DevOps"] +#aliases = ["/##"] ++++ +YOLO keytar scenester, williamsburg etsy mlkshk neutra hexagon photo booth church-key messenger bag. Lyft small batch enamel pin, bicycle rights la croix migas chartreuse ramps microdosing authentic pickled gochujang kombucha. Wolf vaporware stumptown, glossier vinyl everyday carry organic. Subway tile af tumblr listicle photo booth meh trust fund tote bag. Post-ironic gentrify direct trade blue bottle, fingerstache master cleanse butcher. Succulents ethical leggings hexagon vexillologist migas you probably haven't heard of them keytar sustainable church-key viral salvia hell of kinfolk. Lumbersexual taiyaki la croix literally man bun, truffaut mustache godard edison bulb artisan keytar jianbing air plant swag polaroid. + +Actually vinyl fingerstache kickstarter +1 roof party, XOXO swag tousled cold-pressed authentic affogato selvage taiyaki schlitz. Stumptown tumeric lumbersexual, pok pok pabst butcher helvetica coloring book keytar williamsburg. Fam cloud bread meditation, post-ironic waistcoat narwhal chicharrones live-edge authentic try-hard cornhole bespoke kickstarter echo park portland. Cold-pressed lo-fi cornhole kinfolk. Sustainable scenester seitan, vape fanny pack put a bird on it succulents. 90's dreamcatcher messenger bag flannel +1 taxidermy occupy single-origin coffee four dollar toast master cleanse VHS. Small batch williamsburg tumeric meggings fanny pack pok pok paleo cardigan. + +Leggings photo booth beard tumeric heirloom 90's flexitarian locavore unicorn, salvia humblebrag biodiesel lomo. Bushwick chillwave distillery kombucha tbh cray roof party tacos. Wayfarers fingerstache irony, celiac schlitz microdosing austin keytar echo park. Flannel drinking vinegar austin sustainable banjo bicycle rights keytar subway tile intelligentsia williamsburg humblebrag vinyl. Prism keffiyeh mlkshk, venmo glossier distillery +1 raw denim edison bulb pinterest crucifix. Freegan iceland chartreuse leggings hella single-origin coffee tilde. Swag neutra chia before they sold out. + +Cred tilde flannel shaman helvetica cronut bitters mlkshk. Selvage lyft chartreuse shaman man braid gastropub tattooed post-ironic organic freegan austin forage. Enamel pin unicorn +1 schlitz lomo man bun wayfarers. Readymade bespoke polaroid iceland sriracha schlitz tousled flannel. Raw denim enamel pin fanny pack sustainable, butcher deep v thundercats try-hard forage woke fam keffiyeh. Cronut kitsch cray shoreditch pabst paleo normcore DIY bespoke cardigan pug. Crucifix bitters knausgaard neutra, viral distillery selvage banh mi activated charcoal cray. + +Tofu taiyaki sriracha unicorn try-hard cornhole cloud bread keytar wayfarers kinfolk pour-over art party small batch. Tousled DIY coloring book wolf, small batch master cleanse austin letterpress af. Humblebrag pop-up vaporware, readymade organic woke af la croix succulents. Yr hoodie mlkshk woke whatever portland cornhole, brunch raw denim shaman YOLO prism bicycle rights. Helvetica la croix fingerstache chambray tumblr ramps blog waistcoat 8-bit. Dreamcatcher stumptown distillery mixtape sriracha blog la croix. Pabst copper mug street art, kinfolk letterpress chambray swag occupy shoreditch echo park migas post-ironic. + +Dummy text? More like dummy thicc text, amirite? +``` + +| Field Name | Required | Description | Example | +|--------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------| +| Description | Yes | The description of the blog, which is used on summary pages as well as the feed. Markdown is allowed, but only links. | Another blog post! | +| Date | Yes | The release date of the blog. The hugo new blog will pre-populate this, but you may want to adjust it. | 2020-11-12T13:33:18-06:00 | +| PublishDate | No | The datetime used by hugo when the blog should be published. This is only required if you want to set the blog post to be released on a different date from when it was written. | 2020-11-12T13:33:18-06:00 | +| title | Yes | The title of the blog. | "My second blog" | +| images | No | The social sharing image used by Facebook, Twitter, etc. The archetype will populate this with a default sharing image. This image needs to be relative to your baseURL | "img/episode/default-social.jpg" | +| blog_image | Yes | The square thumbnail to represent the blog. A default image is provided, and the archetype will pre-populate it. This image needs to be relative to your baseURL. | "img/episode/default.jpg" | +| Author | Yes | The text representation of the Author of the post. | "Chris Reddington" | +| categories[] | No | If you are using taxonomies, this is the array of categories for the blog. | ["DevOps", "Release"] | +| series[] | No | If you are using taxonomies, this is the array of series for the blog. | ["The Nirvana of DevOps"] | +| tags[] | No | If you are using taxonomies, this is the array of tags for the | ["Ring Deployment", "Phased Rollout"] | +| aliases | No | Other aliases for this blog. | ["/##"] | + ## Episodes Every episode requires a page in the `content/episode` on your site. The command `hugo new episode/myepisode.md` should populate it properly. diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 0000000..c1ec199 --- /dev/null +++ b/archetypes/blog.md @@ -0,0 +1,11 @@ ++++ +Description = "" +Date = {{ .Date }} +PublishDate = {{ .Date }} # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "" +#blog_banner = "" +blog_image = "img/episode/default.jpg" +images = ["img/episode/default-social.jpg"] +#Author = "" +#aliases = ["/##"] ++++ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 54d7f34..8e5c11c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -46,6 +46,11 @@ buildFuture = true identifier = "upcoming" url = "/upcoming" +[[Menu.Main]] + name = "Blog" + identifier = "blog" + url = "/blog" + [[Menu.Main]] name = "Resources" identifier = "resources" diff --git a/exampleSite/content/blog/my-first-blog.md b/exampleSite/content/blog/my-first-blog.md new file mode 100644 index 0000000..f8d273a --- /dev/null +++ b/exampleSite/content/blog/my-first-blog.md @@ -0,0 +1,25 @@ ++++ +Description = "This is a blog post!" +Date = 2020-11-01T13:27:00-06:00 +PublishDate = 2020-11-01T13:27:00-06:00 # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "My First Blog" +images = ["img/episode/default-social.jpg"] +Author = "mstratton" +blog_banner = "img/episode/default-banner.jpg" +blog_image = "img/episode/default.jpg" +categories = ["DevOps", "Deployment"] +tags = ["Version Control", "Git"] +series = ["The Nirvana of DevOps"] +#aliases = ["/##"] ++++ +YOLO keytar scenester, williamsburg etsy mlkshk neutra hexagon photo booth church-key messenger bag. Lyft small batch enamel pin, bicycle rights la croix migas chartreuse ramps microdosing authentic pickled gochujang kombucha. Wolf vaporware stumptown, glossier vinyl everyday carry organic. Subway tile af tumblr listicle photo booth meh trust fund tote bag. Post-ironic gentrify direct trade blue bottle, fingerstache master cleanse butcher. Succulents ethical leggings hexagon vexillologist migas you probably haven't heard of them keytar sustainable church-key viral salvia hell of kinfolk. Lumbersexual taiyaki la croix literally man bun, truffaut mustache godard edison bulb artisan keytar jianbing air plant swag polaroid. + +Actually vinyl fingerstache kickstarter +1 roof party, XOXO swag tousled cold-pressed authentic affogato selvage taiyaki schlitz. Stumptown tumeric lumbersexual, pok pok pabst butcher helvetica coloring book keytar williamsburg. Fam cloud bread meditation, post-ironic waistcoat narwhal chicharrones live-edge authentic try-hard cornhole bespoke kickstarter echo park portland. Cold-pressed lo-fi cornhole kinfolk. Sustainable scenester seitan, vape fanny pack put a bird on it succulents. 90's dreamcatcher messenger bag flannel +1 taxidermy occupy single-origin coffee four dollar toast master cleanse VHS. Small batch williamsburg tumeric meggings fanny pack pok pok paleo cardigan. + +Leggings photo booth beard tumeric heirloom 90's flexitarian locavore unicorn, salvia humblebrag biodiesel lomo. Bushwick chillwave distillery kombucha tbh cray roof party tacos. Wayfarers fingerstache irony, celiac schlitz microdosing austin keytar echo park. Flannel drinking vinegar austin sustainable banjo bicycle rights keytar subway tile intelligentsia williamsburg humblebrag vinyl. Prism keffiyeh mlkshk, venmo glossier distillery +1 raw denim edison bulb pinterest crucifix. Freegan iceland chartreuse leggings hella single-origin coffee tilde. Swag neutra chia before they sold out. + +Cred tilde flannel shaman helvetica cronut bitters mlkshk. Selvage lyft chartreuse shaman man braid gastropub tattooed post-ironic organic freegan austin forage. Enamel pin unicorn +1 schlitz lomo man bun wayfarers. Readymade bespoke polaroid iceland sriracha schlitz tousled flannel. Raw denim enamel pin fanny pack sustainable, butcher deep v thundercats try-hard forage woke fam keffiyeh. Cronut kitsch cray shoreditch pabst paleo normcore DIY bespoke cardigan pug. Crucifix bitters knausgaard neutra, viral distillery selvage banh mi activated charcoal cray. + +Tofu taiyaki sriracha unicorn try-hard cornhole cloud bread keytar wayfarers kinfolk pour-over art party small batch. Tousled DIY coloring book wolf, small batch master cleanse austin letterpress af. Humblebrag pop-up vaporware, readymade organic woke af la croix succulents. Yr hoodie mlkshk woke whatever portland cornhole, brunch raw denim shaman YOLO prism bicycle rights. Helvetica la croix fingerstache chambray tumblr ramps blog waistcoat 8-bit. Dreamcatcher stumptown distillery mixtape sriracha blog la croix. Pabst copper mug street art, kinfolk letterpress chambray swag occupy shoreditch echo park migas post-ironic. + +Dummy text? More like dummy thicc text, amirite? diff --git a/exampleSite/content/blog/my-fourth-blog.md b/exampleSite/content/blog/my-fourth-blog.md new file mode 100644 index 0000000..27ea89a --- /dev/null +++ b/exampleSite/content/blog/my-fourth-blog.md @@ -0,0 +1,24 @@ ++++ +Description = "Another blog post!" +Date = 2020-12-01T13:33:18-06:00 +PublishDate = 2020-12-01T13:33:18-06:00 # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "My fourth blog" +images = ["img/episode/default-social.jpg"] +blog_image = "img/episode/default.jpg" +#Author = "" +#categories = [] +#tags = [] +#series = [] +#aliases = ["/##"] ++++ +YOLO keytar scenester, williamsburg etsy mlkshk neutra hexagon photo booth church-key messenger bag. Lyft small batch enamel pin, bicycle rights la croix migas chartreuse ramps microdosing authentic pickled gochujang kombucha. Wolf vaporware stumptown, glossier vinyl everyday carry organic. Subway tile af tumblr listicle photo booth meh trust fund tote bag. Post-ironic gentrify direct trade blue bottle, fingerstache master cleanse butcher. Succulents ethical leggings hexagon vexillologist migas you probably haven't heard of them keytar sustainable church-key viral salvia hell of kinfolk. Lumbersexual taiyaki la croix literally man bun, truffaut mustache godard edison bulb artisan keytar jianbing air plant swag polaroid. + +Actually vinyl fingerstache kickstarter +1 roof party, XOXO swag tousled cold-pressed authentic affogato selvage taiyaki schlitz. Stumptown tumeric lumbersexual, pok pok pabst butcher helvetica coloring book keytar williamsburg. Fam cloud bread meditation, post-ironic waistcoat narwhal chicharrones live-edge authentic try-hard cornhole bespoke kickstarter echo park portland. Cold-pressed lo-fi cornhole kinfolk. Sustainable scenester seitan, vape fanny pack put a bird on it succulents. 90's dreamcatcher messenger bag flannel +1 taxidermy occupy single-origin coffee four dollar toast master cleanse VHS. Small batch williamsburg tumeric meggings fanny pack pok pok paleo cardigan. + +Leggings photo booth beard tumeric heirloom 90's flexitarian locavore unicorn, salvia humblebrag biodiesel lomo. Bushwick chillwave distillery kombucha tbh cray roof party tacos. Wayfarers fingerstache irony, celiac schlitz microdosing austin keytar echo park. Flannel drinking vinegar austin sustainable banjo bicycle rights keytar subway tile intelligentsia williamsburg humblebrag vinyl. Prism keffiyeh mlkshk, venmo glossier distillery +1 raw denim edison bulb pinterest crucifix. Freegan iceland chartreuse leggings hella single-origin coffee tilde. Swag neutra chia before they sold out. + +Cred tilde flannel shaman helvetica cronut bitters mlkshk. Selvage lyft chartreuse shaman man braid gastropub tattooed post-ironic organic freegan austin forage. Enamel pin unicorn +1 schlitz lomo man bun wayfarers. Readymade bespoke polaroid iceland sriracha schlitz tousled flannel. Raw denim enamel pin fanny pack sustainable, butcher deep v thundercats try-hard forage woke fam keffiyeh. Cronut kitsch cray shoreditch pabst paleo normcore DIY bespoke cardigan pug. Crucifix bitters knausgaard neutra, viral distillery selvage banh mi activated charcoal cray. + +Tofu taiyaki sriracha unicorn try-hard cornhole cloud bread keytar wayfarers kinfolk pour-over art party small batch. Tousled DIY coloring book wolf, small batch master cleanse austin letterpress af. Humblebrag pop-up vaporware, readymade organic woke af la croix succulents. Yr hoodie mlkshk woke whatever portland cornhole, brunch raw denim shaman YOLO prism bicycle rights. Helvetica la croix fingerstache chambray tumblr ramps blog waistcoat 8-bit. Dreamcatcher stumptown distillery mixtape sriracha blog la croix. Pabst copper mug street art, kinfolk letterpress chambray swag occupy shoreditch echo park migas post-ironic. + +Dummy text? More like dummy thicc text, amirite? diff --git a/exampleSite/content/blog/my-second-blog.md b/exampleSite/content/blog/my-second-blog.md new file mode 100644 index 0000000..8965a1e --- /dev/null +++ b/exampleSite/content/blog/my-second-blog.md @@ -0,0 +1,24 @@ ++++ +Description = "Another blog post!" +Date = 2020-11-12T13:33:18-06:00 +PublishDate = 2020-11-12T13:33:18-06:00 # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "My second blog" +images = ["img/episode/default-social.jpg"] +blog_image = "img/episode/default.jpg" +Author = "bkromhout" +categories = ["DevOps", "Release"] +tags = ["Ring Deployment", "Phased Rollout"] +series = ["The Nirvana of DevOps"] +#aliases = ["/##"] ++++ +YOLO keytar scenester, williamsburg etsy mlkshk neutra hexagon photo booth church-key messenger bag. Lyft small batch enamel pin, bicycle rights la croix migas chartreuse ramps microdosing authentic pickled gochujang kombucha. Wolf vaporware stumptown, glossier vinyl everyday carry organic. Subway tile af tumblr listicle photo booth meh trust fund tote bag. Post-ironic gentrify direct trade blue bottle, fingerstache master cleanse butcher. Succulents ethical leggings hexagon vexillologist migas you probably haven't heard of them keytar sustainable church-key viral salvia hell of kinfolk. Lumbersexual taiyaki la croix literally man bun, truffaut mustache godard edison bulb artisan keytar jianbing air plant swag polaroid. + +Actually vinyl fingerstache kickstarter +1 roof party, XOXO swag tousled cold-pressed authentic affogato selvage taiyaki schlitz. Stumptown tumeric lumbersexual, pok pok pabst butcher helvetica coloring book keytar williamsburg. Fam cloud bread meditation, post-ironic waistcoat narwhal chicharrones live-edge authentic try-hard cornhole bespoke kickstarter echo park portland. Cold-pressed lo-fi cornhole kinfolk. Sustainable scenester seitan, vape fanny pack put a bird on it succulents. 90's dreamcatcher messenger bag flannel +1 taxidermy occupy single-origin coffee four dollar toast master cleanse VHS. Small batch williamsburg tumeric meggings fanny pack pok pok paleo cardigan. + +Leggings photo booth beard tumeric heirloom 90's flexitarian locavore unicorn, salvia humblebrag biodiesel lomo. Bushwick chillwave distillery kombucha tbh cray roof party tacos. Wayfarers fingerstache irony, celiac schlitz microdosing austin keytar echo park. Flannel drinking vinegar austin sustainable banjo bicycle rights keytar subway tile intelligentsia williamsburg humblebrag vinyl. Prism keffiyeh mlkshk, venmo glossier distillery +1 raw denim edison bulb pinterest crucifix. Freegan iceland chartreuse leggings hella single-origin coffee tilde. Swag neutra chia before they sold out. + +Cred tilde flannel shaman helvetica cronut bitters mlkshk. Selvage lyft chartreuse shaman man braid gastropub tattooed post-ironic organic freegan austin forage. Enamel pin unicorn +1 schlitz lomo man bun wayfarers. Readymade bespoke polaroid iceland sriracha schlitz tousled flannel. Raw denim enamel pin fanny pack sustainable, butcher deep v thundercats try-hard forage woke fam keffiyeh. Cronut kitsch cray shoreditch pabst paleo normcore DIY bespoke cardigan pug. Crucifix bitters knausgaard neutra, viral distillery selvage banh mi activated charcoal cray. + +Tofu taiyaki sriracha unicorn try-hard cornhole cloud bread keytar wayfarers kinfolk pour-over art party small batch. Tousled DIY coloring book wolf, small batch master cleanse austin letterpress af. Humblebrag pop-up vaporware, readymade organic woke af la croix succulents. Yr hoodie mlkshk woke whatever portland cornhole, brunch raw denim shaman YOLO prism bicycle rights. Helvetica la croix fingerstache chambray tumblr ramps blog waistcoat 8-bit. Dreamcatcher stumptown distillery mixtape sriracha blog la croix. Pabst copper mug street art, kinfolk letterpress chambray swag occupy shoreditch echo park migas post-ironic. + +Dummy text? More like dummy thicc text, amirite? diff --git a/exampleSite/content/blog/my-third-blog.md b/exampleSite/content/blog/my-third-blog.md new file mode 100644 index 0000000..392d655 --- /dev/null +++ b/exampleSite/content/blog/my-third-blog.md @@ -0,0 +1,24 @@ ++++ +Description = "Another blog post!" +Date = 2020-11-21T13:33:18-06:00 +PublishDate = 2020-11-21T13:33:18-06:00 # this is the datetime for the when the epsiode was published. This will default to Date if it is not set. Example is "2016-04-25T04:09:45-05:00" +title = "My third blog" +images = ["img/episode/default-social.jpg"] +blog_image = "img/episode/default.jpg" +Author = "" +categories = [] +tags = [] +series = [] +#aliases = ["/##"] ++++ +YOLO keytar scenester, williamsburg etsy mlkshk neutra hexagon photo booth church-key messenger bag. Lyft small batch enamel pin, bicycle rights la croix migas chartreuse ramps microdosing authentic pickled gochujang kombucha. Wolf vaporware stumptown, glossier vinyl everyday carry organic. Subway tile af tumblr listicle photo booth meh trust fund tote bag. Post-ironic gentrify direct trade blue bottle, fingerstache master cleanse butcher. Succulents ethical leggings hexagon vexillologist migas you probably haven't heard of them keytar sustainable church-key viral salvia hell of kinfolk. Lumbersexual taiyaki la croix literally man bun, truffaut mustache godard edison bulb artisan keytar jianbing air plant swag polaroid. + +Actually vinyl fingerstache kickstarter +1 roof party, XOXO swag tousled cold-pressed authentic affogato selvage taiyaki schlitz. Stumptown tumeric lumbersexual, pok pok pabst butcher helvetica coloring book keytar williamsburg. Fam cloud bread meditation, post-ironic waistcoat narwhal chicharrones live-edge authentic try-hard cornhole bespoke kickstarter echo park portland. Cold-pressed lo-fi cornhole kinfolk. Sustainable scenester seitan, vape fanny pack put a bird on it succulents. 90's dreamcatcher messenger bag flannel +1 taxidermy occupy single-origin coffee four dollar toast master cleanse VHS. Small batch williamsburg tumeric meggings fanny pack pok pok paleo cardigan. + +Leggings photo booth beard tumeric heirloom 90's flexitarian locavore unicorn, salvia humblebrag biodiesel lomo. Bushwick chillwave distillery kombucha tbh cray roof party tacos. Wayfarers fingerstache irony, celiac schlitz microdosing austin keytar echo park. Flannel drinking vinegar austin sustainable banjo bicycle rights keytar subway tile intelligentsia williamsburg humblebrag vinyl. Prism keffiyeh mlkshk, venmo glossier distillery +1 raw denim edison bulb pinterest crucifix. Freegan iceland chartreuse leggings hella single-origin coffee tilde. Swag neutra chia before they sold out. + +Cred tilde flannel shaman helvetica cronut bitters mlkshk. Selvage lyft chartreuse shaman man braid gastropub tattooed post-ironic organic freegan austin forage. Enamel pin unicorn +1 schlitz lomo man bun wayfarers. Readymade bespoke polaroid iceland sriracha schlitz tousled flannel. Raw denim enamel pin fanny pack sustainable, butcher deep v thundercats try-hard forage woke fam keffiyeh. Cronut kitsch cray shoreditch pabst paleo normcore DIY bespoke cardigan pug. Crucifix bitters knausgaard neutra, viral distillery selvage banh mi activated charcoal cray. + +Tofu taiyaki sriracha unicorn try-hard cornhole cloud bread keytar wayfarers kinfolk pour-over art party small batch. Tousled DIY coloring book wolf, small batch master cleanse austin letterpress af. Humblebrag pop-up vaporware, readymade organic woke af la croix succulents. Yr hoodie mlkshk woke whatever portland cornhole, brunch raw denim shaman YOLO prism bicycle rights. Helvetica la croix fingerstache chambray tumblr ramps blog waistcoat 8-bit. Dreamcatcher stumptown distillery mixtape sriracha blog la croix. Pabst copper mug street art, kinfolk letterpress chambray swag occupy shoreditch echo park migas post-ironic. + +Dummy text? More like dummy thicc text, amirite? diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..0c450b8 --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,45 @@ +{{ define "main" }} + +

{{ .Title }}

+Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "blog-metadata.html" . }} +

+{{ .Content }} +
+
+ +
+ +
+
+ + +{{ end }} diff --git a/layouts/blog/summary.html b/layouts/blog/summary.html new file mode 100644 index 0000000..305d843 --- /dev/null +++ b/layouts/blog/summary.html @@ -0,0 +1,20 @@ +
+

{{ .Title }}

+ {{- if isset .Params "author" -}} + + {{- else -}} + + {{- end -}} + +
+{{ if isset .Params "description" }} + {{ if ne .Params.descripton "" }} + {{ .Params.description | markdownify }} + {{ end }} +{{ else }} + {{ .Summary }} +{{ end }} + +
diff --git a/layouts/partials/author.html b/layouts/partials/author.html new file mode 100644 index 0000000..c9b45ff --- /dev/null +++ b/layouts/partials/author.html @@ -0,0 +1,6 @@ +{{ with .Page.Param "Author" }} + {{ $hosts := where $.Site.RegularPages ".Section" "host" }} + {{ $filesWithAuthor := where $.Site.RegularPages ".File.BaseFileName" . }} + {{ $author := index ($filesWithAuthor | intersect $hosts) 0 }} + by {{ $author.Title }} +{{ end }} diff --git a/layouts/partials/blog-metadata.html b/layouts/partials/blog-metadata.html new file mode 100644 index 0000000..45f71a2 --- /dev/null +++ b/layouts/partials/blog-metadata.html @@ -0,0 +1,14 @@ +{{ $pageScope := . }} + +{{ with .Page.Param "Author" }} + {{ partial "author.html" $pageScope }} +{{ end }} +{{ with .Page.Param "categories" }} + | Category: {{ partial "categories.html" $pageScope }} +{{ end }} +{{ with .Page.Param "series" }} + | Series: {{ partial "series.html" $pageScope }} +{{ end }} +{{ with .Page.Param "tags" }} + | {{ partial "tags.html" $pageScope }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/grid-blog.html b/layouts/partials/grid-blog.html new file mode 100644 index 0000000..3d1b543 --- /dev/null +++ b/layouts/partials/grid-blog.html @@ -0,0 +1,117 @@ +
+ +
+

Blog Posts

+
+ +
+ + {{ $paginator := .Paginate ((where .Pages.ByDate "Section" "blog").Reverse) }} + + {{ range $paginator.Pages }} + {{ $.Scratch.Set "episode" .File.BaseFileName }} +
+ +
+

{{ title .Title }}

+ Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "blog-metadata.html" .}} +
+ +
+ {{ end }} + + +
+ +
+{{ if gt $paginator.TotalPages 1 }} +
+
+ + + +
+
+{{ end }} + + diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index 2812f1e..75ede81 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -48,8 +48,12 @@ } -{{- if (isset $.Site.Params "rss_subscribe" ) -}} - -{{- else -}} - -{{- end -}} +{{ if eq .Section "blog" }} + +{{ else }} + {{- if (isset $.Site.Params "rss_subscribe" ) -}} + + {{- else -}} + + {{- end -}} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/jumbotron.html b/layouts/partials/jumbotron.html index d378804..fa668f3 100644 --- a/layouts/partials/jumbotron.html +++ b/layouts/partials/jumbotron.html @@ -65,13 +65,19 @@ {{ end }} {{ if (isset .Site.Params "rss_subscribe" )}} {{ else }} {{ end }} + + {{ if ge (len .Site.Pages) 1 }} + + {{ end }} diff --git a/layouts/partials/row-blog.html b/layouts/partials/row-blog.html new file mode 100644 index 0000000..8c7ea5a --- /dev/null +++ b/layouts/partials/row-blog.html @@ -0,0 +1,214 @@ +
+ +
+

+ Latest Blog Post +

+ + {{ range first 1 ((where .Pages.ByDate "Section" "blog").Reverse) }} + {{- with .Params.truncate -}} + {{- $.Scratch.Set "truncate" . }} + {{- else -}} + {{- with .Site.Params.truncate -}} + {{- $.Scratch.Set "truncate" . }} + {{- else -}} + {{- $.Scratch.Set "truncate" 600 -}} + {{- end -}} + {{- end -}} + {{- with .Params.blog_banner -}} + {{- $.Scratch.Set "blog_banner" "true" -}} + {{- end -}} + + {{- if eq ($.Scratch.Get "blog_banner") "true" -}} +
+
+

{{ .Title }}

+ Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "blog-metadata.html" . }} +
+
+
+
+ +
+
+
+
+ {{ .Description | markdownify | truncate ($.Scratch.Get "truncate") " "}} Read More +
+
+ {{- else -}} + +
+
+

{{ .Title }}

+ Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "blog-metadata.html" .}} +
+
+ {{- if .Params.blog_image -}} +
+
+ +
+
+ {{- if ge (countrunes .Description ) ($.Scratch.Get "truncate") -}} +

{{ .Description | markdownify | truncate ($.Scratch.Get "truncate") " "}} Read More

+ {{- else -}} +

{{ .Description | markdownify }}

+ {{- end -}} +
+
+ {{- else -}} +
+ {{- if ge (countrunes .Description ) ($.Scratch.Get "truncate") -}} +

{{ .Description | markdownify | truncate ($.Scratch.Get "truncate") " "}} Read More

+ {{- else -}} +

{{ .Description | markdownify }}

+ {{- end -}} +
+ {{- end -}} + {{- end -}} + + {{- end -}} +
+
+ +
+ +{{- if (where .Pages.ByDate "Section" "blog") -}} +{{- $paginator := .Paginate (after 1 ((where .Pages.ByDate "Section" "blog").Reverse)) }} +{{- $list := (where .Pages.ByDate "Section" "blog") -}} +{{- $len := (len $list) -}} +
+ +
+{{- if gt $len 1 -}} + {{- range $paginator.Pages -}} + {{- with .Params.truncate -}} + {{- $.Scratch.Set "truncate" . }} + {{- else -}} + {{- with .Site.Params.truncate -}} + {{- $.Scratch.Set "truncate" . }} + {{- else -}} + {{- $.Scratch.Set "truncate" 600 -}} + {{- end -}} + {{- end -}} +
+
+

{{ .Title }}

+ Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "blog-metadata.html" .}} +
+
+
+ {{- if .Params.blog_image -}} +
+ +
+
+ {{- if ge (countrunes .Description ) ($.Scratch.Get "truncate") -}} +

{{ .Description | markdownify | truncate ($.Scratch.Get "truncate") " "}} Read More

+ {{- else -}} +

{{ .Description | markdownify }}

+ {{- end -}} +
+ {{- else -}} +
+ {{- if ge (countrunes .Description ) ($.Scratch.Get "truncate") -}} +

{{ .Description | markdownify | truncate ($.Scratch.Get "truncate") " "}} Read More

+ {{- else -}} +

{{ .Description | markdownify }}

+ {{- end -}} +
+ {{- end -}} +
+ {{- end -}} + {{- end -}} +
+ +
+
+
+{{- if gt $paginator.TotalPages 1 -}} +
+
+ + + +
+
+{{- end -}} +
+{{- end -}} +
+ diff --git a/layouts/section/blog.html b/layouts/section/blog.html new file mode 100644 index 0000000..d114c3b --- /dev/null +++ b/layouts/section/blog.html @@ -0,0 +1,11 @@ +{{ define "main" }} + {{ if isset $.Site.Params "site_layout" }} + {{ if eq $.Site.Params.site_layout "grid" }} + {{- partial "grid-blog.html" . }} + {{ else }} + {{- partial "row-blog.html" . }} + {{ end }} + {{ else }} + {{- partial "row-blog.html" . }} + {{ end }} +{{ end }} diff --git a/layouts/section/blog.rss.xml b/layouts/section/blog.rss.xml new file mode 100644 index 0000000..d01bd6f --- /dev/null +++ b/layouts/section/blog.rss.xml @@ -0,0 +1,24 @@ + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent blogs {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + + {{ range .Data.Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | htmlEscape }} + + {{ end }} + + \ No newline at end of file -- cgit v1.2.3