JuliaPluto / computational-thinking-template

Template to build a course webpage like the *Introduction to computational thinking with Julia* course tought at MIT
http://juliapluto.github.io/computational-thinking-template/
Other
32 stars 3 forks source link

make course info configuration easier #3

Closed lucaferranti closed 1 year ago

lucaferranti commented 1 year ago

fixes #2 fixes #4

This PR separates the course data from the layout file.

Inspired by how eleventy handles it, now PlutoPages will automatically read a src/_data folder into a dict (key-value pair is filename => filecontent) and store it inside FrontMatter.

This way, lecturers can add their course data (name, semester, code, authors, link to repo, etc., etc.) by simply editing the files under _data with no need to go through the layout.jlhtml file.

it also automates generation of the highlight box in the homepage and moves the code to generate highlights and subjects into their own files under assets/scripts, making welcome.md easier to read and customize

lucaferranti commented 1 year ago

layout file has a line

<script data-goatcounter="https://computationalthinking-stats.plutojl.org/count" async src="//computationalthinking-stats.plutojl.org/count.js"></script>

that should probably also be parametrized (and documented!), but not sure how, since I'm not familiar with the service