Skip to content
Snippets Groups Projects
Commit 718220df authored by Greg Wilson's avatar Greg Wilson
Browse files

Match pages by URL rather than title when constructing next/prev links.

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 https://github.com/swcarpentry/instructor-training/issues/160.
parent 6e8a62aa
Branches
Tags
No related merge requests found
......@@ -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 %}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment