datacarpentry / python-ecology-lesson

Data Analysis and Visualization in Python for Ecologists
https://datacarpentry.org/python-ecology-lesson
Other
160 stars 310 forks source link

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

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 Data 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 adjusted internal links as part of this PR. If and when this is merged, I'll also make sure the link on https://datacarpentry.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.

maxim-belkin commented 3 years ago

Thanks, Toby. The change looks good to me. GH Actions failure is unrelated.