The past two weeks I've been forced to bounce between a bunch of different languages and environments. When I sit here and quantify it, it gives me pause. In the last two weeks alone—python, jekyll, php 5 & 7, mySQL, Liquid, JS, HTML,XML, IMSCC, SCSS, all on systems. Canvas LMS, Blackboard LMS, mySQL Db, wordpress...You name it. Jeez.
So at my day job, we are transitioning between LMS systems, and it has been a challenge getting the courses migrated. We also have to are going through a redesign process to meet the needs of the new system. We also manage an external library of reusable learning objects using the Jekyll headless CMS on a static web server. Those need to all be re-rendered as well.
Ideally we would have a Jekyll page call multiple layouts. One layout for normal web based mobile and desktop use. The other for inclusion in the canvas LMS. WE use Canvas Pages with embedded iFrames to access our learning objects. Understandably those embeds have different user interface needs than our normal web browsing experience.
The low bar method of getting what want, would be to generate two "post" html files. One would call the default template and render a normal index.ntml file. The other would call an "learning object" (LO) template that is purpose built to fit inside the pages we share to Canvas Commons.
I like to challenge myself, especially when it means saving time. So I would like one single data file that feeds both templates. If you read the Jekyll documentation you will find that this is possible. I could use a liquid tag called relative_include. This allows you to include an external file at render time. Simple right. I should be able to rename our existing slide set to data.html. Make two posts that each call separate layout templates, and then just insert the include with the path to the data file. It should work, but it doesn't.
It's an actual bug on the pull request list.
Just my luck.