LibraryCarpentry / lc-data-intro

Library Carpentry: Introduction to Working with Data (Regular Expressions)
https://librarycarpentry.org/lc-data-intro/
Other
29 stars 82 forks source link

make lesson suitable for teaching with locally-built (serverless) pages #176

Closed tobyhodges closed 3 years ago

tobyhodges commented 3 years ago

See discussion here for more background: https://github.com/datacarpentry/datacarpentry.github.io/issues/542

In short, some Carpentries lessons use the path /guide/ for their Instructor Notes page and others use /guide/index.html (the default defined in _config.yml). This PR removes permalinks with a trailing slash from the YAML front matter of the Instructor Notes (_extras/guide.md) and other Extras files, consistent with new lessons created with the lesson template. Although there's no functional difference in the online versions of the lesson pages, pages with a trailing slash in the permalink will result in broken links in the version of the lesson built locally. We'd like local builds to be usable e.g. in workshops taking place at locations with limited or unreliable Internet access.

Keeping the paths to these files consistent will also help us avoid broken links on the Library Carpentry Lessons page, and ensure that equivalent paths in new lessons created with the template are consistent with previously-developed lessons like this one.

I did a sweep through the lesson and found no internal links that need to be adjusted as part of this PR. If and when this is merged, I'll also make sure the link on https://librarycarpentry.org/lessons/ to the Instructor Notes page isn't broken, and make another sweep through the lesson pages too.

Finally, I also removed the layout field from several pages, as the default layout is already set for Episodes and Extras pages in _config.yml.

sharilaster commented 3 years ago

Thank you so much @tobyhodges!!!