HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
anderspitman
tuplates-py
Python2020–2024
anderspitman / tuplates-py

tuplates-py

Commit valid code; not templates

2Distinct people
4Mentions
0Explicit recommenders
3GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Commit valid code; not templates

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year4 dated mentions

Observed mentions: 2020-01-13 23:20:38 UTC to 2024-09-11 14:53:47 UTC.

01232020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC312

What Hacker News says

4 sources
Most of my web projects these days are vanilla. I'd been dabbling on simple things for years, but it took a big leap a few months ago when I discovered Web Components are still a thing and have come a long way since 2012. We're finishing up re-writing an app at work that went from a ~17 dependency Vue app to a ~2 dependency (d3js) Web Component app. The codebase is a joy to work on. No more dependency hell. We don't even need npm. The code, as committed to git, will probably still run unmodified on browsers in 20 years. It's a great feeling. A few tips: * If you have a lot of JS files and want excellent performance you may still be able to skip a build step by leveraging `modulepreload` * If you want some typing while still running without a build step, you can use JSDoc to embed TypeScript annotations for your JS[0]. * If you really want
Read the rest
to have a mostly HTML site but don't want to manually duplicate code, I've had decent success with a technique I call "tuplates"[1][2]. Basically it's a very simple templating tool where the output is intended to be committed to git. It uses comments so it's language agnostic. * If you go web components I highly recommend these best practices[3]. A lot of them were confusing for me at first but just keep them on your radar as you're learning. [0]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported... [1]: Description: https://github.com/anderspitman/tuplates-js/blob/master/READ... [2]: Latest implementation: https://github.com/anderspitman/tuplates [3]: https://web.dev/articles/custom-elements-best-practices
In Going Buildless
I've experimented[0] with something along these lines. The basic idea is that it's desirable to be able to reuse snippets/functions across projects, but you shouldn't need to go full left-pad. So basically you run tuplates.py on your project, it goes through all files and any line comment that includes "tuplate_start(URI)" it goes out and fetches the URI (local filesystem or HTTP supported), and replaces everything until it finds a line comment with "tuplate_end". Nice thing is it enables basic templating in any language, and instead of checking templates into source control, you're committing working code. Also combines really nicely with jsdelivr where you can import specific versions of files directly from GitHub. [0]: https://github.com/anderspitman/tuplates
In JSR: The JavaScript Registry
>> If you clone my blog[1] (with submodules) you should be able to host it exactly as-is from the repo. > Who would want to do that? Future me. Actually just today in order to publish this post I had to re-learn how I had set up my dependencies, so I switched it to submodules so it won't be a problem again. > However if you want to optimize for subsequent page loads I suggest you do so without compromising your initial page load and completely without JavaScript by utilizing link prefetching [1] which is supported by all major browsers [2] except Safari. Believe me, I spent a torturous amount of time trying to achieve the same results with static HTML+prefetching/preloading. First off, Safari is a huge number of users. Plus you can't include HTML from HTML, so this requires a build step (though I've been experimenting with a new tool[0] f
Read the rest
or mitigating that somewhat). Also, this doesn't allow maintaining state between navigations. [0] https://github.com/anderspitman/tuplates
In Please make your products work with URLs

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.