I’m planning to transition a course website from Documenter to Franklin.jl, which I think will help with a number of things. In particular, I have a bunch of boilerplate that needs to be added to each lesson, assignment, lecture etc, a lot of which is duplicated, and I’m trying to sort out the best way to do this. As an example, here’s a lesson page, which as you can see has a number of badges with links to different components (lecture, assignment, repository / description) plus things like due dates. Then it has learning objectives and other metadata about the lesson, etc
A lot of this information is repeated on the assignment page, and furthermore each lesson has a very similar structure with a number of features that could be minimally specified in a toml file or something.
My hope is to have some series of components where I could specify most of the structure once and swap out variables for each lesson, and in the ideal scenario, have something generic where I could just change a few things and specify different parameters for different course runs. One example of a configuration:
author = "Kevin Bonham, PhD" [lessons] [lessons.lesson1] title = "Getting Started" lecture_links = ["lecture01", "lecture02"] lecture_dates = [2021-06-09, 2021-06-11] assignment_link = "assignment01" assignment_due = 2021-06-14 [lessons.lesson2] title = "Data Types and Functions" # ... etc [assignments] [assignments.assignment01] # ... etc
So I feel like I can accomplish this either with a couple of different html templates, a couple of
hfuns, or both. And I’m wondering what folks think makes the most sense. I think I’ll end up feeling more comfortable just writing functions since I don’t have much experience making webpages, but are there some advantages to using page templates instead?