Skip to content

Commit

Permalink
Match pages by URL rather than title when constructing next/prev links.
Browse files Browse the repository at this point in the history
Earlier version was matching episode.title with page.title to find the episode object for a page when generating next/prev links.
This fails when several episodes have the same title (e.g., "Morning Coffee" for a two-day workshop schedule).
This fix matches episode.url with page.url instead.

This fixes #160.
  • Loading branch information
gvwilson committed Apr 25, 2016
1 parent 6e8a62a commit 718220d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/episode_title.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Find previous and next episodes (if any).
{% endcomment %}
{% for episode in site.episodes %}
{% if episode.title == page.title %}
{% if episode.url == page.url %}
{% unless forloop.first %}
{% assign prev_episode = prev %}
{% endunless %}
Expand Down

0 comments on commit 718220d

Please sign in to comment.