Skip to content

Commit

Permalink
Add support for mulitple iterations of a guest (#130)
Browse files Browse the repository at this point in the history
This change allows for the "aka" field, which points a guest at another
version of their guest file (for example, if a bio changes, a name
changes, etc) in the interests of not rewriting history.

Fixes #117
  • Loading branch information
mattstratton authored Jun 13, 2017
1 parent 37c032d commit 4602815
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ Facebook = "johndoe"
Linkedin = "johndoe"
GitHub = "johndoe"
Thumbnail = "img/guest/jdoe.jpg"
Aka = "jdoe2"
+++
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.
Expand All @@ -259,6 +260,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" |
| `Aka` | No | The name 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). | "mstratton2" |
### Sponsors

If your podcast doesn't have sponsors, feel free to disregard this section.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/episode/dec.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date = "2015-12-25T04:10:10-05:00"
episode = "3"
episode_image = "img/episode/dec.jpg"
explicit = "no"
guests = ["chamilton", "jlong", "kdixon", "ccooper"]
guests = ["chamilton", "jlong", "kdixon", "ccooper", "jsmith2"]
images = ["img/episode/default-social.jpg"]
news_keywords = []
podcast_duration = "1:08:22"
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/guest/jsmith.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ Thumbnail = "img/guest/jsmith.jpg"
Pinterest = "mattstratton"
Instagram = "mattstratton"
YouTube = ""
Aka = "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.
17 changes: 17 additions & 0 deletions exampleSite/content/guest/jsmith2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
+++
Title = "Jane Smith-Wesson"
date = "2016-12-08T20:55:58-06:00"
Twitter = "jsmith"
Website = "http://www.apple.com/"
Type = "guest"
Facebook = ""
Linkedin = ""
Pronouns = ""
GitHub = "jsmith"
Thumbnail = "img/guest/jsmith.jpg"
Pinterest = "mattstratton"
Instagram = "mattstratton"
YouTube = ""
Aka = "jsmith"
+++
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.
10 changes: 10 additions & 0 deletions layouts/guest/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ <h3>Episodes Featuring {{ .Title }}</h3>
{{ end }}
{{ end }}
{{ end }}
{{- with .Params.Aka -}}
{{- $.Scratch.Set "guest-name" . -}}
{{- range $page := where $.Site.Pages "Type" "episode" -}}
{{- range $page.Params.guests -}}
{{- if eq . ($.Scratch.Get "guest-name") -}}
<a href = "{{$page.Permalink}}" class = "guest_page_episode_link list-group-item list-group-item-action">{{$page.Title}}</a>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
</div>
</div>
</div>
Expand Down

0 comments on commit 4602815

Please sign in to comment.