From 718220dfa0c9308b0c317772a799aa3a43b5f424 Mon Sep 17 00:00:00 2001 From: Greg Wilson <gvwilson@third-bit.com> Date: Mon, 25 Apr 2016 07:03:06 -0400 Subject: [PATCH] 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. --- _includes/episode_title.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/episode_title.html b/_includes/episode_title.html index cfa47cd..e6fbb8c 100644 --- a/_includes/episode_title.html +++ b/_includes/episode_title.html @@ -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 %} -- GitLab