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:
authorChris Reddington <791642+chrisreddington@users.noreply.github.com>2020-12-23 00:07:39 +0300
committerGitHub <noreply@github.com>2020-12-23 00:07:39 +0300
commit3db321ad112b90636d30e0cb5ed587d0bd20219a (patch)
treeaa862e9fc8d85e01edf7d134fb3bdfef58b920b6
parent7d7d88c4fa334036b52612b1262c117dc589404e (diff)
Add episode numbers/prefix in RSS and Relevant Titles/Links [Attempt #2] (#322)
* Attempt #2 at title changes Signed-off-by: Chris Reddington <791642+chrisreddington@users.noreply.github.com> * Tweaks to conditional based on review. Signed-off-by: Chris Reddington <791642+chrisreddington@users.noreply.github.com>
-rw-r--r--REFERENCE.md2
-rw-r--r--exampleSite/config.toml3
-rw-r--r--exampleSite/content/episode/aug.md1
-rw-r--r--layouts/episode/single.html16
-rw-r--r--layouts/guest/single.html14
-rw-r--r--layouts/host/single.html14
-rw-r--r--layouts/partials/grid-taxonomy.html14
-rw-r--r--layouts/partials/grid-upcoming.html16
-rw-r--r--layouts/partials/grid.html14
-rw-r--r--layouts/partials/row-taxonomy.html16
-rw-r--r--layouts/partials/row-upcoming.html14
-rw-r--r--layouts/partials/row.html42
-rw-r--r--layouts/section/episode.rss.xml16
13 files changed, 164 insertions, 18 deletions
diff --git a/REFERENCE.md b/REFERENCE.md
index dad77ef..9aec11e 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -42,6 +42,8 @@ These should be set under the `[params]` section:
|-------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `mainSections` | Yes | Sets the page type for what shows up on the homepage. This must be set. | "episode"
| `site_theme` | No | The color scheme for the overall site. Currently the options are `orange` (default), `grey`, and `blue`. | "blue" |
+| `episode_number_style` | No | The format used for episode numbers in the episode's RSS feed. The choices are either parens, dash or brackets. If not set, the episode title in the RSS feed will just default to the title of the episode, without any episode number included. | "brackets" |
+| `episode_number_prefix` | No | A prefix used in the episode's RSS feed before the episode number. For example, if episode_number_prefix was set to CWC for episode 1, then the output might be Title of the Episode - CWC1. | "CWC" |
| `site_layout` | No | The layout for the home page. The options are `row` (default) or `grid`. | "grid" |
| `enable_jumbo` | No | When using the `row` layout, will set a jumbotron at the top instead of the sidebar. | "true" |
| `show_next_upcoming` | No | If there are episodes with the upcoming frontmatter set to true, then it will display the next episode on homepage. This halves the screen real estate of the latest episode section, which will then be displayed side by side. | "true" |
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 7e85368..c4f67b3 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -64,7 +64,8 @@ buildFuture = true
[params]
mainSections = ["episode"]
-
+episode_number_style = "brackets"
+episode_number_prefix = "CWC"
site_theme = "grey"
# site_layout = "grid"
site_layout = "row"
diff --git a/exampleSite/content/episode/aug.md b/exampleSite/content/episode/aug.md
index 93fce3f..f4e0fbe 100644
--- a/exampleSite/content/episode/aug.md
+++ b/exampleSite/content/episode/aug.md
@@ -3,7 +3,6 @@ Description = "First mover advantage business-to-consumer ramen innovator busine
aliases = ["/11"]
author = "Matt"
date = "2016-08-25T04:09:58-05:00"
-episode = "11"
episode_image = "img/episode/aug.jpg"
episode_banner = "img/episode/default-banner.jpg"
explicit = "true"
diff --git a/layouts/episode/single.html b/layouts/episode/single.html
index cd57805..58b894e 100644
--- a/layouts/episode/single.html
+++ b/layouts/episode/single.html
@@ -1,8 +1,20 @@
{{ define "main" }}
<div class="row">
- <div class="col">
- <h1>{{ title .Title }}</h1>
+ <div class="col">
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h1>{{ title .Title }} ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h1>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h1>{{ title .Title }} [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h1>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h1>{{ title .Title }} - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h1>
+ {{ else }}
+ <h1>{{ title .Title }}</h1>
+ {{ end }}
+ {{ else }}
+ <h1>{{ title .Title }}</h1>
+ {{ end }}
{{- if ne $.Params.upcoming true -}}
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
{{- else -}}
diff --git a/layouts/guest/single.html b/layouts/guest/single.html
index 594811a..f058f60 100644
--- a/layouts/guest/single.html
+++ b/layouts/guest/single.html
@@ -108,7 +108,19 @@
{{- range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) -}}
{{- 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>
+ {{ if and (isset $.Site.Params "episode_number_style") ($page.Params.episode)}}
+ {{ if eq $.Site.Params.episode_number_style "parens" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} ({{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }})</a>
+ {{ else if eq $.Site.Params.episode_number_style "brackets" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} [{{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}]</a>
+ {{ else if eq $.Site.Params.episode_number_style "dash" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} - {{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}</a>
+ {{ else }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
+ {{ end }}
+ {{ else }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
+ {{ end }}
{{- end -}}<!-- if eq guest name-->
{{- end -}}<!-- range params guests -->
{{- end -}}<!--range episodes -->
diff --git a/layouts/host/single.html b/layouts/host/single.html
index 5d3ea3f..92d42a9 100644
--- a/layouts/host/single.html
+++ b/layouts/host/single.html
@@ -87,7 +87,19 @@
{{ range $page := (where ( where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.upcoming" "!=" true ) }}
{{ range $page.Params.hosts }}
{{ if eq . ($.Scratch.Get "host-name") }}
- <a href = "{{$page.Permalink}}" class = "guest_page_episode_link list-group-item list-group-item-action">{{$page.Title}}</a>
+ {{ if and (isset $.Site.Params "episode_number_style") ($page.Params.episode)}}
+ {{ if eq $.Site.Params.episode_number_style "parens" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} ({{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }})</a>
+ {{ else if eq $.Site.Params.episode_number_style "brackets" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} [{{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}]</a>
+ {{ else if eq $.Site.Params.episode_number_style "dash" }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }} - {{ with $.Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ $page.Params.episode }}</a>
+ {{ else }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
+ {{ end }}
+ {{ else }}
+ <a href="{{ $page.Permalink }}" class= "guest_page_episode_link list-group-item list-group-item-action">{{ $page.Title }}</a>
+ {{ end }}
{{ end }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/grid-taxonomy.html b/layouts/partials/grid-taxonomy.html
index bfe0b17..086bdda 100644
--- a/layouts/partials/grid-taxonomy.html
+++ b/layouts/partials/grid-taxonomy.html
@@ -20,7 +20,19 @@
</a>
</div>
<div class="grid_episode_detail">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3>{{ title .Title }}</h3></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small class = "grid_episode_title">Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
diff --git a/layouts/partials/grid-upcoming.html b/layouts/partials/grid-upcoming.html
index 4c72ea4..6db7a17 100644
--- a/layouts/partials/grid-upcoming.html
+++ b/layouts/partials/grid-upcoming.html
@@ -19,8 +19,20 @@
</a>
</div>
- <div class="grid_episode_detail">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3>{{ title .Title }}</h3></a>
+ <div class="grid_episode_detail">
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small class = "grid_episode_title">Scheduled for {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
diff --git a/layouts/partials/grid.html b/layouts/partials/grid.html
index 0c486b0..e691a29 100644
--- a/layouts/partials/grid.html
+++ b/layouts/partials/grid.html
@@ -32,7 +32,19 @@
</a>
</div>
<div class="grid_episode_detail">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3>{{ title .Title }}</h3></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small class = "grid_episode_title">Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
diff --git a/layouts/partials/row-taxonomy.html b/layouts/partials/row-taxonomy.html
index 00f706a..4a75f20 100644
--- a/layouts/partials/row-taxonomy.html
+++ b/layouts/partials/row-taxonomy.html
@@ -25,8 +25,20 @@
{{- end -}}
{{- end -}}
<div class = "row homepage_episode_row">
- <div class = "col-md-12">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3 class= "grid_episode_title">{{ .Title }}</h3></a>
+ <div class = "col-md-12">
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
</div>
diff --git a/layouts/partials/row-upcoming.html b/layouts/partials/row-upcoming.html
index 5ddacdf..451c33c 100644
--- a/layouts/partials/row-upcoming.html
+++ b/layouts/partials/row-upcoming.html
@@ -26,7 +26,19 @@
{{- end -}}
<div class = "row homepage_episode_row">
<div class = "col-md-12">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3 class= "grid_episode_title">{{ .Title }}</h3></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small>Scheduled for {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
</div>
diff --git a/layouts/partials/row.html b/layouts/partials/row.html
index d4f0d47..a4a42ed 100644
--- a/layouts/partials/row.html
+++ b/layouts/partials/row.html
@@ -43,7 +43,19 @@
{{- if eq ($.Scratch.Get "youtube") "true" -}}
<div class = "row homepage_episode_row">
<div class = "col">
- <a href="{{ .Permalink }}" class = "row_latest_episode_title"><h2>{{ .Title }}</h2></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h2>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h2>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h2>
+ {{ else }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h2>
+ {{ end }}
+ {{ else }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a></h2>
+ {{ end }}
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
</div>
@@ -62,7 +74,19 @@
{{- else if eq ($.Scratch.Get "episode_banner") "true" -}}
<div class = "row homepage_episode_row">
<div class = "col">
- <a href="{{ .Permalink }}" class = "row_latest_episode_title"><h2>{{ .Title }}</h2></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h2>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h2>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h2>
+ {{ else }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h2>
+ {{ end }}
+ {{ else }}
+ <h2><a href="{{ .Permalink }}" class= "row_latest_episode_title">{{ .Title }}</a></h2>
+ {{ end }}
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
</div>
@@ -149,7 +173,19 @@
{{- end -}}
<div class = "row homepage_episode_row">
<div class = "col-md-12">
- <a href="{{ .Permalink }}" class= "grid_episode_title"><h3 class= "grid_episode_title">{{ .Title }}</h3></a>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</h3>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</h3>
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a> ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</h3>
+ {{ end }}
+ {{ else }}
+ <h3><a href="{{ .Permalink }}" class= "grid_episode_title">{{ .Title }}</a></h3>
+ {{ end }}
<small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} {{ partial "episode-metadata.html" .}}</small>
</div>
</div>
diff --git a/layouts/section/episode.rss.xml b/layouts/section/episode.rss.xml
index d9a6006..3f4e4ed 100644
--- a/layouts/section/episode.rss.xml
+++ b/layouts/section/episode.rss.xml
@@ -52,8 +52,20 @@
<generator>Hugo -- gohugo.io</generator>
{{- range (where ( where .Site.Pages "Type" "episode") ".Params.upcoming" "!=" true) -}}
{{ if isset .Params "podcast_file" }}
- <item>
- <title>{{ title .Title }}</title>
+ <item>
+ {{ if and (isset .Site.Params "episode_number_style") (.Params.episode) }}
+ {{ if eq .Site.Params.episode_number_style "parens" }}
+ <title>{{ title .Title }} ({{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }})</title>
+ {{ else if eq .Site.Params.episode_number_style "brackets" }}
+ <title>{{ title .Title }} [{{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}]</title>
+ {{ else if eq .Site.Params.episode_number_style "dash" }}
+ <title>{{ title .Title }} - {{ with .Site.Params.episode_number_prefix }}{{ . }}{{ end }}{{ .Params.episode }}</title>
+ {{ else }}
+ <title>{{ title .Title }}</title>
+ {{ end }}
+ {{ else }}
+ <h1>{{ title .Title }}</h1>
+ {{ end }}
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} </pubDate>
<dc:creator>{{ .Site.Params.itunes_author }}</dc:creator>