From 9322ae2029cb4e0431ab55638d0672d6638a91d8 Mon Sep 17 00:00:00 2001 From: Matt Stratton Date: Sun, 5 Apr 2020 11:23:36 -0500 Subject: [PATCH] Add support for twitch profiles Fixes #256 Signed-off-by: Matt Stratton --- REFERENCE.md | 11 ++++++++++- archetypes/guest.md | 1 + archetypes/host.md | 1 + exampleSite/config.toml | 2 ++ exampleSite/content/guest/scox.md | 1 + exampleSite/content/host/mstratton.md | 1 + layouts/guest/list.html | 3 +++ layouts/guest/single.html | 5 +++++ layouts/host/single.html | 5 +++++ layouts/partials/header.html | 5 +++++ layouts/partials/hosts.html | 3 +++ 11 files changed, 37 insertions(+), 1 deletion(-) diff --git a/REFERENCE.md b/REFERENCE.md index 476de659..3d1c0f64 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -89,7 +89,7 @@ These are the social network parameters for your overall site. They should be se |------------------|----------|------------------------------------------------------------------------------------------------------------------|----------------------| | `github` | No | GitHub username only. | "mattstratton" | | `gitlab` | No | GitLab username only. | "mattstratton" | -| `facebook` | No | Name of the Facebook page (not the URL). | "Arresteddevops" | +| `facebook` | No | Name of the Facebook page (not the URL). | "Arresteddevops" | | `facebook_admin` | No | This needs to be one or more page admins to get domain insights. | ["500557137","1234"] | | `twitter` | No | Twitter name without the `@` sign. | "arresteddevops" | | `twitter_domain` | Yes | This domain shows in twitter cards as "View on `twitter_domain`". | "arresteddevops.com" | @@ -98,6 +98,7 @@ These are the social network parameters for your overall site. They should be se | `instagram` | No | Instagram username. | "nozzleio" | | `youtube` | No | Name of the YouTube channel. | "arresteddevops" | | `linkedin` | No | LinkedIn profile name. This is the part that comes after the `https://www.linkedin.com/in/` in your profile URL. | "mattstratton" | +| `twitch` | No | Twitch channel/profile for your site. This is the part that comes after `https://twitch.tv/` | "mattstratton" | ### Host/Author Parameters @@ -129,6 +130,7 @@ You also will set the social parameters (all are optional) under `[params.author | `pinterest` | No | Pinterest username. | "nozzleio" | | `instagram` | No | Instagram username. | "nozzleio" | | `youtube` | No | Name of the user's YouTube profile. | mattstratton | +| `twitch` | No | Name of the user's Twitch profile. | mattstratton | | `linkedin` | No | LinkedIn profile name. This is the part that comes after the `https://www.linkedin.com/in/` in your profile URL. | "mattstratton" | | `homepage` | No | The user's website, including the `http` at the beginning. | "https://www.mattstratton.com" | @@ -174,6 +176,7 @@ I recommend the following permalink settings, although the theme will work just about = "/:filename/" episode = "/:filename/" ``` + ### Menus Castanet supports menus with up to one submenu per menu item. The menu name must be "Main", and the menus are sorted based upon their identifier. At this time, you must have at least one menu item, or the theme will error out. @@ -289,6 +292,7 @@ Graphical user interface influencer value proposition startup hackathon iPad ana | `youtube` | No | The ID of the YouTube video (not the full URL). This will display the video on the episode page, and if you are using the row layout, it will display for the latest episode. | "8ClZXJsgpHY" | | `truncate` | No | The number of characters to truncate the summary on the row layout.. The default value (if not set) is 600 characters. | "700" | | `guid` | No | A fixed, globally unique identifier for the episode which should never change. If one is not specified the URL of the `podcast_file` will be used instead. | "aae20190418" | + ## Guests If you don't have guests on your episodes, feel free to ignore this section. @@ -309,6 +313,8 @@ Facebook = "johndoe" Linkedin = "johndoe" GitHub = "johndoe" Thumbnail = "img/guest/jdoe.jpg" +Twitch = "johndoe" +YouTube = "johndoe" Aka = ["jsmith", "jsmith2"] +++ Spoon fresh pie ingredients groceries oranges luncheon farm. Broth chick peas Chinese food indie foods. Cream heating cheese food locally grown first class caramelize restaurant grocery shopping savory chick peas. Recommendations lovely starter soda herbes fridge chocolate eat better quinoa sausage java chef locally grown wholesome. Broil sweet sushi lasagna cream indian. Desert sour vegetarian sous-chef soda oven tasty eat better rice recommendations relish salt butter grape. Grocery shopping delicious Chinese food beets conserve ginger. Authentic blend drink sausage. Groceries sour desert. Take away lasagna consumer luncheon scent cookie beer groceries meals restaurants java cheese vegan chick peas. @@ -327,6 +333,7 @@ Spoon fresh pie ingredients groceries oranges luncheon farm. Broth chick peas Ch | `Pinterest` | No | Pinterest profile name. | "mattstratton" | | `Instagram` | No | Instagram profile name. | "mattstratton" | | `YouTube` | No | YouTube profile/channel name | "mattstratton" | +| `Twitch` | No | Twitch profile/channel name | "mattstratton" | | `Aka` | No | The name(s) of another guest file which is an alternate identity for this guest (for example, if the bio changes, name changes, etc). This should be set in both directions (i.e., the `Aka` field should be set on `mstratton.md` and `mstratton2.md` pointing to each other). | Aka = ["jsmith", "jsmith2"] | ## Hosts @@ -353,6 +360,7 @@ Thumbnail = "img/host/johndoe.png" Pinterest = "johndoe" Instagram = "johndoe" YouTube = "johndoe" +Twitch = "johndoe" +++ Spoon fresh pie ingredients groceries oranges luncheon farm. Broth chick peas Chinese food indie foods. Cream heating cheese food locally grown first class caramelize restaurant grocery shopping savory chick peas. Recommendations lovely starter soda herbes fridge chocolate eat better quinoa sausage java chef locally grown wholesome. Broil sweet sushi lasagna cream indian. Desert sour vegetarian sous-chef soda oven tasty eat better rice recommendations relish salt butter grape. Grocery shopping delicious Chinese food beets conserve ginger. Authentic blend drink sausage. Groceries sour desert. Take away lasagna consumer luncheon scent cookie beer groceries meals restaurants java cheese vegan chick peas. ``` @@ -369,6 +377,7 @@ Spoon fresh pie ingredients groceries oranges luncheon farm. Broth chick peas Ch | `Pinterest` | No | Pinterest profile name. | "mattstratton" | | `Instagram` | No | Instagram profile name. | "mattstratton" | | `YouTube` | No | YouTube profile/channel name | "mattstratton" | +| `Twitch` | No | Twitch profile/channel name | "mattstratton" | ## Sponsors diff --git a/archetypes/guest.md b/archetypes/guest.md index 29068d30..b0f8dd1b 100644 --- a/archetypes/guest.md +++ b/archetypes/guest.md @@ -11,5 +11,6 @@ Thumbnail = "" Pinterest = "" Instagram = "" YouTube = "" +Twitch = "" #Aka = [] +++ diff --git a/archetypes/host.md b/archetypes/host.md index 40ec6108..27133a27 100644 --- a/archetypes/host.md +++ b/archetypes/host.md @@ -11,4 +11,5 @@ Thumbnail = "" Pinterest = "" Instagram = "" YouTube = "" +Twitch = "" +++ diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ff8e62f9..584c7dba 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -112,6 +112,7 @@ disqusShortname = "" instagram = "nozzleio" youtube = "arresteddevops" linkedin = "mattstratton" + twitch = "mattstratton" [params.authors] [params.authors.Matt] @@ -127,6 +128,7 @@ disqusShortname = "" pinterest = "mattstratton" instagram = "instagram" youtube = "mattstratton" + twitch = "mattstratton" [params.authors.Trevor] name = "Trevor Hess" thumbnail = "https://www.arresteddevops.com/img/trevor.png" diff --git a/exampleSite/content/guest/scox.md b/exampleSite/content/guest/scox.md index 4c6d26ea..27a3a13c 100644 --- a/exampleSite/content/guest/scox.md +++ b/exampleSite/content/guest/scox.md @@ -12,5 +12,6 @@ Thumbnail = "img/guest/scox.jpg" Pinterest = "" Instagram = "" YouTube = "" +Twitch = "mattstratton" +++ non et ad nesciunt dignissimos quod suscipit similique alias. fugiat aut asperiores delectus corporis. diff --git a/exampleSite/content/host/mstratton.md b/exampleSite/content/host/mstratton.md index 19449f9b..5beda98e 100644 --- a/exampleSite/content/host/mstratton.md +++ b/exampleSite/content/host/mstratton.md @@ -12,5 +12,6 @@ Thumbnail = "img/host/matt.png" Pinterest = "mattstratton" Instagram = "mattstratton" YouTube = "" +Twitch = "mattstratton" +++ Matt Stratton is a solutions architect at Chef, where he demonstrates how Chef’s automation platform provides speed and flexibility to clients’ infrastructure. He is devoted to concepts like Continuous Delivery and Infrastructure as Code, and his license plate actually says “DevOps”. He lives in Chicago and has an unhealthy obsession with Doctor Who, Firefly, and Game of Thrones. And whiskey. diff --git a/layouts/guest/list.html b/layouts/guest/list.html index 07217719..4385ad37 100644 --- a/layouts/guest/list.html +++ b/layouts/guest/list.html @@ -56,6 +56,9 @@

{{ .Title } {{ with .Params.YouTube }} {{ end }} + {{ with .Params.Twitch }} + + {{ end }} {{ end }} diff --git a/layouts/guest/single.html b/layouts/guest/single.html index c86291f7..79c40b8a 100644 --- a/layouts/guest/single.html +++ b/layouts/guest/single.html @@ -68,6 +68,11 @@

{{ title .Title }}

{{ end }} + {{ if .Params.Twitch }} + + + + {{ end }} diff --git a/layouts/host/single.html b/layouts/host/single.html index cd6b2cb8..b69c2a73 100644 --- a/layouts/host/single.html +++ b/layouts/host/single.html @@ -68,6 +68,11 @@

{{ title .Title }}

{{ end }} + {{ if .Params.Twitch }} + + + + {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a0ffb2d9..bcfadcec 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -76,6 +76,11 @@ {{ end }} + {{ if (isset .Site.Params.social "twitch" ) }} +
  • + +
  • + {{ end }} diff --git a/layouts/partials/hosts.html b/layouts/partials/hosts.html index e15b5d48..6dddf427 100644 --- a/layouts/partials/hosts.html +++ b/layouts/partials/hosts.html @@ -46,6 +46,9 @@

    {{ .Title }} {{ with .Params.YouTube }} {{ end }} + {{ with .Params.Twitch }} + + {{ end }} {{- end -}}