Site Archived Nov 7, 2023

Devlog

These are my daily notes and internal conversations during development. They may be helpful to understand the larger context of decisions that were made, and how I learned and explored while building.

Devlog < 2023 < February < 13

| by date | | thread: collate |

More thinking on this as I run into limitations. I would like to be able to “template a template”, as in, create a template for a set of blocks for a type of output (like a dev log), and then generate a new set of blocks with some input. The pain points I have now are that every item in a group/sequence (like a dev log) has a ton of boilerplate, and the boilerplate is very similar and conceptually easy to parameterize. But since the similarity is in the template and not the content, I can’t actually template that. What is the nature of this problem?

---

An idea came to me while thinking this over: what if instead of just exporting a file, you could export a block itself? Since it’s possible to escape the block commands, we could actually render a template of a template, all we would need to do is tell the parser to treat the output of a “block export” as an input to the block parser. This might be really quick to implement too…

---

This worked out pretty great, actually. All I had to do was add a new “block export” command, and recursively feed all the block exports through the renderer, and then back into the block parser. Now I can generate (and then use) templates at render time.

| thread: collate | | by date |