SUMMARY // I added “mini web app” functionality for my Eleventy template pages. I can create individual Typescript source files inside a project directory that works with live-reloading.
Today’s Sharepiece


Today’s daily build challenge sharepiece is workflow for incorporating TypeScript modules into an Eleventy template. It’s built on top of the code that I assembled yesterday. I’ve included a link to the build system below for the curious.
The Building Process
My current mini-goal is to make an “Activity Bingo Board”See A Bingo Board for Task Focusing tracking sheet that will help keep me focused on useful tasks for 30 Day Building Challenge. Rather than draw this in Affinity Designer, I’m writing software to do itWhy do this the hard way? Software will automate form creation and is a stepping stone toward making productivity apps. I can also refine my code libraries for future freelance projects.. Not only that, I want to write that software so it runs inside of my Eleventy PKMS, turning it into a compute -capable notebook.
Theory of Operation
I created an HTML template which looks like this:
expeditions/build-2025/day02.html is in my Eleventy src directory

- The
MDshortcode is something I made just to pipe the content through the markdown processor, since HTML templates don’t do this by default. - line 15 defines an SVG container witha few inline styles.
- line 17 loads an ES module from the designated path.
The reason this is an HTML template is that if you use a regular Markdown template with the .md extension, blank lines turn into malformed paragraph tags that messes up the script.
The javascript sourcefile is transpiled from this TypeScript source:
app-source/day02.ts in a repo outside of the PKMS, symlinked as src-codelab at the same level as src so it’s visible in my Visual Studio project.

- line 2 shows an import from my URSYS realtime web app framework, showing proof of concept for importing external modules
- line 12 shows that a formatted console log will be emitted to the console
The resulting page looks like this:
This version of the page also shows an animated red square in the SVG element.


- Note that source mapping is enabled in the Javascript console. It’s off by one because this version of
day02.tsis different than Figure 2.
Hacking the Eleventy Directory Structure
The Trouble with Configuration Files
Notably, tooling configuration files like tsconfig.json, .eslintrc.js are searched for by looking in the root directory, which is Eleventy. The same happens with NodeJS module resolution with node_modules. Visual Studio Code’s Intellisense and add-ons ALSO looks for this for live linting in the editor, and is easily confused.
Since my root folder is Eleventy using CommonJS and the src-codelab folder is TypeScript-ESM, VSCode gets confused without very tricky configuration.