Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stratton <matt.stratton@gmail.com>2016-09-25 21:41:00 +0300
committerMatt Stratton <matt.stratton@gmail.com>2016-09-25 21:41:00 +0300
commit74f92c55301211f343fa63a08d0acb6ba878c791 (patch)
tree487425846c67430ef4ab35c52c14fde5557d9291
parentabaab5faa7f6ba197390bf7087a06165ea3e063a (diff)
Add guest functionality.v.0.1.4
Fixes #16
-rw-r--r--README.md47
-rw-r--r--exampleSite/content/episode/april.md2
-rw-r--r--exampleSite/content/episode/march.md2
-rw-r--r--exampleSite/content/episode/may.md2
-rw-r--r--exampleSite/data/guests/gbluth.yml8
-rw-r--r--exampleSite/data/guests/jdoe.yml9
-rw-r--r--exampleSite/data/guests/msmith.yml9
-rw-r--r--exampleSite/static/img/guest/jdoe.jpgbin0 -> 118057 bytes
-rw-r--r--layouts/episode/single.html52
-rw-r--r--static/img/guest/default-guest.pngbin0 -> 15613 bytes
10 files changed, 124 insertions, 7 deletions
diff --git a/README.md b/README.md
index 46ff9b2..138b152 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ After installing Castanet successfully it requires a just a few more steps to ge
You will need to add a handful of configuration items to your `config.toml` file. You can take a look at the [example site](http://github.com/mattstratton/castanet/blahblahblah) to see them in action. They are described below:
- `[params]`
- - `homepage` - the fully qualified domain name of your homepage. This is different than the `BaseURL` setting, as it must be externally available for feed readers, and others. This must NOT end with a slash. Example: `"https://www.mattstratton.com"`
+ - ~`homepage` - the fully qualified domain name of your homepage. This is different than the `BaseURL` setting, as it must be externally available for feed readers, and others. This must NOT end with a slash. Example: `"https://www.mattstratton.com"`~
- `copyright_notice` - Your copyright information for the footer of the page. Can contain Markdown. Example: `"Copyright 2016 [Matt Stratton](https://www.mattstrattion.io)"`
- `itunes_subscribe` - The URL of your podcast in the iTunes store. Optional. Example: `"http://itunes.apple.com/us/podcast/arrested-devops/id773888088?mt=2&uo=4&at=11lsCi"`
- `android_subscribe` - The URL for your podcast for Android users. You can generate this URL at [Subscribe on Android](https://subscribeonandroid.com). Optional. Example: ``"http://subscribeonandroid.com/feeds.podtrac.com/VGAulpN7MY1U"``
@@ -62,7 +62,7 @@ You will need to add a handful of configuration items to your `config.toml` file
- `pinterest` - Optional. Example: `"nozzleio"`
- `instagram` - Optional. Example: `"nozzleio"`
- `youtube` - Name of the YouTube channel. Optional. Example: `"arresteddevops"`
- - `linkedin` -LinkedIn profile name. Optional. This is the part that comes after the `https://www.linkedin.com/in/` in your profile URL. Example: `"mattstratton"`
+ - `linkedin` - LinkedIn profile name. Optional. This is the part that comes after the `https://www.linkedin.com/in/` in your profile URL. Example: `"mattstratton"`
- `[params.authors]` - you can have multiple authors avaialable; just make more of each
- `[params.authors.USERNAME]` - replace `USERNAME` with an author name. Example: `[params.authors.matt]`
@@ -75,6 +75,10 @@ You will need to add a handful of configuration items to your `config.toml` file
- `twitter` - Example: `mattstratton`
- `linkedin` - Example: `"mattstratton"`
+#### A note about `BaseURL`
+
+This theme is fairly dependent upon a proper `BaseURL` being set in the `config.toml`. This has to do with how the feed is generated as well as some of the social metadata (these things cannot be relative URL's). I'm fully aware that this can cause issues with some build systems, and I'm trying to work on a good solution for this.
+
#### Permalinks
@@ -86,3 +90,42 @@ I recommend the following permalink settings, although the theme will work just
about = "/:filename/"
episode = "/:filename/"
```
+
+### Guests
+
+If you don't have guests on your episodes, feel free to ignore this section.
+
+#### Guest data files
+
+Every guest on your show needs a corresponding data file in the `data/guests` directory of your site. Generally speaking, you should be able to name these however you like, but I have only tested it with the format `firstinitiallastname.yml`, i.e., for "John Doe" the file would be `jdoe.yml`.
+
+A guest file takes the following structure:
+
+```
+name: jdoe
+full_name: "John Doe"
+thumbnail: "/img/guest/jdoe.jpg"
+bio: "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."
+homepage: "http://www.google.com"
+github: "johndoe"
+facebook: "johndoe"
+twitter: "johndoe"
+linkedin: "johndoe"
+```
+
+(See the example site for, well, examples)
+
+- `name` - This MUST match the name you will refer to the guest as in your frontmatter. Ideally it is the same name as the file. Again, I prefer first initial lastname format. Required.
+- `full_name` - The full name of the guest. This is what is displayed on the episode page, etc. Required.
+- `thumbnail` - The image for the guest. This image must be 500 px x 500 px. You can either enter a value relative to your `BaseURL`, or a fully qualified URL. If you want to use the default, set this to `""`. Optional. If left blank, or not existent, a default image will be provided. You can replace this default image by putting a new 500 px x 500 px PNG image at `/static/img/guest/default-guest.png` in your site (not in the theme!)
+- `bio` - The bio of your guest. You can use Markdown in here. If you use quotes, make sure to escape them. Required.
+- `homepage` - Optional.
+- `github` - Guest's GitHub username. Optional.
+- `facebook` - Guest's Facebook username. Example: `matt.stratton`. Do not use the full URL. Optional.
+- `twitter` - Guest's Twitter username, without the `@`. Optional.
+- `linkedin` - LinkedIn profile name. Optional. This is the part that comes after the `https://www.linkedin.com/in/` in your profile URL. Example: `"mattstratton"`
+
+
+#### Frontmatter
+
+If your episode has guests, populate the `guests[]` array with a comma-separated list of their names. For example, `["jdoe", "msmith", "gbluth"]`. If there is only one guest, no comma is needed.
diff --git a/exampleSite/content/episode/april.md b/exampleSite/content/episode/april.md
index 2ff4c35..650dcea 100644
--- a/exampleSite/content/episode/april.md
+++ b/exampleSite/content/episode/april.md
@@ -7,7 +7,7 @@ date = "2016-04-25T04:09:45-05:00"
episode = "7"
episode_image = "/img/episode/default.jpg"
explicit = "no"
-guests = []
+guests = ["jdoe"]
images = ["http://www.google.com/img/episode/default-social.jpg"]
news_keywords = []
podcast_duration = "1:08:22"
diff --git a/exampleSite/content/episode/march.md b/exampleSite/content/episode/march.md
index 24e3d23..5aadb0a 100644
--- a/exampleSite/content/episode/march.md
+++ b/exampleSite/content/episode/march.md
@@ -7,7 +7,7 @@ date = "2016-03-25T04:09:40-05:00"
episode = "6"
episode_image = "/img/episode/default.jpg"
explicit = "no"
-guests = []
+guests = ["jdoe", "msmith"]
images = ["/img/episode/default-social.jpg"]
news_keywords = []
podcast_duration = "1:08:22"
diff --git a/exampleSite/content/episode/may.md b/exampleSite/content/episode/may.md
index cb02aad..fd31d15 100644
--- a/exampleSite/content/episode/may.md
+++ b/exampleSite/content/episode/may.md
@@ -7,7 +7,7 @@ date = "2016-05-25T04:09:48-05:00"
episode = "8"
episode_image = "/img/episode/default.jpg"
explicit = "no"
-guests = []
+guests = ["gbluth"]
images = ["/img/episode/default-social.jpg"]
news_keywords = []
podcast_duration = "1:08:22"
diff --git a/exampleSite/data/guests/gbluth.yml b/exampleSite/data/guests/gbluth.yml
new file mode 100644
index 0000000..f7c2a3f
--- /dev/null
+++ b/exampleSite/data/guests/gbluth.yml
@@ -0,0 +1,8 @@
+name: gbluth
+full_name: "George Michael Bluth"
+bio: "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."
+homepage: "http://www.google.com"
+github: "faceblock"
+facebook: "faceblock"
+twitter: "faceblock"
+linkedin: "faceblock"
diff --git a/exampleSite/data/guests/jdoe.yml b/exampleSite/data/guests/jdoe.yml
new file mode 100644
index 0000000..048b946
--- /dev/null
+++ b/exampleSite/data/guests/jdoe.yml
@@ -0,0 +1,9 @@
+name: jdoe
+full_name: "John Doe"
+thumbnail: "/img/guest/jdoe.jpg"
+bio: "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."
+homepage: "http://www.google.com"
+github: "johndoe"
+facebook: "johndoe"
+twitter: "johndoe"
+linkedin: "johndoe"
diff --git a/exampleSite/data/guests/msmith.yml b/exampleSite/data/guests/msmith.yml
new file mode 100644
index 0000000..1d52c09
--- /dev/null
+++ b/exampleSite/data/guests/msmith.yml
@@ -0,0 +1,9 @@
+name: gbluth
+full_name: "Mary Smith"
+thumbnail: ""
+bio: "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."
+homepage: "http://www.google.com"
+github: "marysmith"
+facebook: "marysmith"
+twitter: "marysmith"
+linkedin: "marysmith"
diff --git a/exampleSite/static/img/guest/jdoe.jpg b/exampleSite/static/img/guest/jdoe.jpg
new file mode 100644
index 0000000..27d21f4
--- /dev/null
+++ b/exampleSite/static/img/guest/jdoe.jpg
Binary files differ
diff --git a/layouts/episode/single.html b/layouts/episode/single.html
index 0cd10c1..50d7f98 100644
--- a/layouts/episode/single.html
+++ b/layouts/episode/single.html
@@ -30,11 +30,59 @@
{{ .Content }}
</div>
</div>
- <div class = "row">
+ {{ if .Params.guests }}
+ <div class = "row"><!-- guests begin -->
+ <div class = "col-md-12">
+ <h2>Guests</h2>
+ </div>
+ <div class = "col-md-12">
+ {{ range $person :=.Params.guests }}
+ {{ if (isset $.Site.Data.guests $person) }}
+ {{ $p := (index $.Site.Data.guests $person) }}
+ <div class="row">
+ <div class="col-md-3">
+ {{ if and (isset $p "thumbnail") (ne $p.thumbnail "") }}
+ {{ if (eq (slicestr $p.thumbnail 0 4) "http") }}
+ <img alt = "{{ $p.full_name }}" src = "{{ $p.thumbnail}}" class="img-responsive" width = "250px">
+ {{ else }}
+ <img alt = "{{ $p.full_name }}" src = "{{ $.Site.BaseURL }}{{ $p.thumbnail}}" class="img-responsive" width = "250px">
+ {{ end }}
+ {{ else }}
+ <img alt = "{{ $p.full_name }}" src = "{{ $.Site.BaseURL }}/img/guest/default-guest.png" class="img-responsive" width = "250px" />
+ {{ end }}
+ </div>
+ <div class= "col-md-8">
+ <h2>{{ $p.full_name }}</h2>
+ {{ if isset $p "bio" }}
+ <p>{{ $p.bio | markdownify }}</p>
+ {{ end }}
+ {{ if isset $p "homepage" }}
+ <a href = "{{ $p.homepage}}"><i class="fa fa-home fa-2x"></i></a>
+ {{ end }}
+ {{ if isset $p "twitter" }}
+ <a href = "https://twitter.com/{{ $p.Twitter }}"><i class="fa fa-twitter-square fa-2x"></i></a>
+ {{ end }}
+ {{ if isset $p "github"}}
+ <a href = "https://github.com/{{ $p.GitHub}}"><i class="fa fa-github-square fa-2x"></i></a>
+ {{ end }}
+ {{ if isset $p "linkedin" }}
+ <a href = "{{ $p.LinkedIn}}"><i class="fa fa-linkedin-square fa-2x"></i></a>
+ {{ end }}
+ {{ if isset $p "facebook" }}
+ <a href = "{{ $p.Facebook}}"><i class="fa fa-facebook-square fa-2x"></i></a>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div>
+ </div><!-- guests end -->
+ {{ end }}
+ <div class = "row"><!-- sharing begins -->
<div class = "col-md-12">
<div id="share"></div>
</div>
- </div>
+ </div><!-- sharing ends -->
<div class = "row"> <!-- pager begin -->
<div class = "col-md-12">
<nav>
diff --git a/static/img/guest/default-guest.png b/static/img/guest/default-guest.png
new file mode 100644
index 0000000..c408d31
--- /dev/null
+++ b/static/img/guest/default-guest.png
Binary files differ