HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
adityaathalye
shite
Shell2022–2026
adityaathalye / shite

shite

The little hot-reloadin' static site maker from shell.

6Distinct people
33Mentions
1Explicit recommenders
249GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The little hot-reloadin' static site maker from shell.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

Hah! Superfriend! First... Love your site (clean, fast, easy on the eyes, no need for JS to read). And your writing... yours is a proper blog. I used to feel bad about not…

adityaathalye used a recommendation phrase. 3 indexed comments match. This is a phrase match, not a verdict.

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 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:01:57 AM 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 year33 dated mentions

Observed mentions: 2022-04-14 05:58:11 UTC to 2026-06-28 18:10:28 UTC.

0510152022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 13 mentions; 1 submissions, 12 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

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
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC413
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC13112
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC404
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC817
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC404

What Hacker News says

13 sources
adityaathalye·Oct 8, 2023Recommendation phrase
Bookmarked! These look like amazing study projects; the kind one can copy and learn from. Quite like how they do it in art school. Each one of them looks like it solves a nontrivial problem, and edifies the reader on the basic contours/tenets of the problem/solution space. I love this kind of stuff, because it shows one _can_ solve a pretty juicy problem with not that much code, honestly. Also because it suggests that the industrial-strength equivalent has a lot more in for use cases, corner cases, and/or optimisations that are not relevant for one's requirements (at least not yet, maybe not ever). I aspire to write code like that. Useful, concise, but not obtuse. Some of my code is not as significant as those examples, and maybe falls short of my ideals, but it gets a lot done in well under 500 loc. e.g. my website maker in Bash [1] (hot
Read the rest
-builds and hot-refreshes without JS), or the JS that drives text art animations for Hanukkah of Data [2]. [1] https://github.com/adityaathalye/shite is about 350 LoC counted this way (excluding the script containing HTML templates). $ grep -E -v "^$|\\s?#" bin/{events,metadata,templating,utils,hotreload}.sh | wc -l 359 [2] https://www.evalapply.org/posts/animate-text-art-javascript/ the text art animator. $ grep --count -v -E \ -e "^$" -e "//" -e "/|\s+\*.*" \ assets/js/text_artist.js 213
In 500 Lines or Less (2016)
I love the code [1]. Mine [2] is a bit over engineered because I wanted hot-reloading (without JS), and it was a delightful yak shave. But the basic idea is the same --- heredocs for templating, using a plaintext -> html compiler (pandoc in my case), an intermediate CSV for index generation. Also some handy sed-fu [3] to lift out front matter. Classic :) Very nice! [1] https://github.com/karlb/karl.berlin/blob/master/blog.sh [2] https://github.com/adityaathalye/shite [3] I'm doing this: https://github.com/adityaathalye/shite/blob/master/bin/templ... case ${file_type} in org ) # Multiline processing of org-style header/preamble syntax, boxed # between begin/end markers we have defined. We use org-mode's own # comment line syntax to write the begin/end markers. # cf. https://orgmode.
Read the rest
org/guide/Comment-Lines.html sed -n -E \ -e '/^\#\s+shite_meta/I,/^\#\s+shite_meta/I{/\#\s+shite_meta.*/Id; s/^\#\+(\w+)\:\s+(.*)/\L\1\E,\2/Ip}' ;; md ) # Multiline processing of Jekyll-style YAML front matter, boxed # between `---` separators. sed -n -E \ -e '/^\-{3,}/,/^\-{3,}/{/^\-{3,}.*/d; s/^(\w+)\:\s+(.*)/\L\1\E,\2/Ip}' ;; html ) # Use HTML meta tags and parse them, according to this convention: # <meta name="KEY" content="VALUE"> # cf. https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_… sed -n -E \ -e 's;^\s?<meta\s+name="?(\w+)"?\s+content="(.*)">;\L\1\E,\2;Ip' ;; esac
In “Make” as a static site generator (2022)
xdotool emulates user actions under the X Window System (e.g. typing, mouse around, click etc.). I'm using it to send keypresses to the browser, as you rightly observe. So if I want to just reload a page, the browser gets F5. To GOTO some page, it gets a stream of keystrokes for the URL characters and then Enter. It's really that simple-minded, and it works! This case statement covers my usage: https://github.com/adityaathalye/shite/blob/master/bin/hotre...
In Show HN: Shite – little hot-reloadin' static site maker from shell
Lovely to hear from you, Andy! Thank you for sharing. It's good to know this work is in fine company :) > although it sounds like it has some drawbacks? Oh yes. The Xdotool Reload Method emulates keystrokes, so it has... drawbacks... as you put it mildly :) For my use-case, it literally does F5, or it fills out a url and hits Enter. cf. this `case` statement: https://github.com/adityaathalye/shite/blob/master/bin/hotre... I wanted to keep /mandatory/ moving parts to a minimum in a hand-rolled setup. So I sort of went hardline about avoiding prerequisites like a server process, and especially a JS client. The xdotool trick worked surprisingly well (for the most part), and so I stuck with it! > it has been working well in practice for years This is the holy grail. I really hope I get years-long stability out of it. Based on my experience so
Read the rest
far, I feel good about the long-term odds. > I also have a Makefile for incremental rebuilds, but I would really like to replace that with Ninja. I was going to write a Makefile at some point. I'll have a look at Ninja. Thanks for the tip!
In Show HN: Shite – little hot-reloadin' static site maker from shell
Nice! I also use inotifywait for hot reload when writing https://www.oilshell.org/ I never heard of the xdotool method ... although it sounds like it has some drawbacks? https://github.com/adityaathalye/shite/blob/master/bin/hotre... I do it with a crappy Python web server that dynamically inserts some JavaScript. This also has bugs and drawbacks, though I don't think any fundamental ones ... At some point I would like to "make it nice", but it has been working well in practice for years I think the method is reasonable, and doesn't depend on your local desktop environment as much. I also have a Makefile for incremental rebuilds, but I would really like to replace that with Ninja. Ninja goes pretty well with shell (although it also has the issue of needing to escape $ as $$)
In Show HN: Shite – little hot-reloadin' static site maker from shell
In fact, I rely on that sort of early termination / circuit breaking as a feature! That is a big reason why I use functions. They help me define sane fallbacks, and/or enforce API contracts. Those, in turn, are points where I can enforce "fail and die" behaviour. Design notes: https://www.evalapply.org/posts/shell-aint-a-bad-place-to-fp... Example from shite: Hard stop if mandatory front matter for posts is absent: https://github.com/adityaathalye/shite/blob/master/bin/templ... edit: clarity
In Show HN: Shite – little hot-reloadin' static site maker from shell

Show HN: Shite – little hot-reloadin' static site maker from shell

Or more precisely, my little site maker... It is a personal tool that I thoroughly enjoyed making, and enjoy using to write my website <https://evalapply.org>. A caveat before any more; nobody was supposed to promote this insanity. Like, terrible things have been done involving inotify and xdotool. But. It showed up on HN some months ago. That too while it was still, shall we say, fermenting. It got "done" some time thence, and of course one could not let the half-past just be. So here we are, for better or worse. Thank you HN mods for helping me repost! _\\// The README explains all, animated GIFs and whatnot. Some assorted highlights: - shite's, ah, "business logic" (except templates) is about 300 lines of Bash, written in Functional Programming style [^]. Pipeline all the things! - The innards won't surprise Perl/PHP/Shell gentlepe
Read the rest
rson hackers from the last century. - The local hot reloading workflow is surprisingly nice, and occasionally hilarious! No JavaScript needed. - Full rebuilds are low performance and that's fine :) - Pandoc is great. - Sometimes sed and regex is exactly the HTML parser you need. *Very* sometimes. - stdio buffering can mess you up - jq -Rr @html # escapes HTML; what?! ... and all sorts of other stuff noted in the README and inline docs. [^] because shell ain't a bad place to FP... https://www.evalapply.org/posts/shell-aint-a-bad-place-to-fp... --- P.S.The commit history stops at 3-odd months ago, because I've been using a private fork for day-to-day content drafting, publishing, and layout tweaks. The "business logic" is by and large the same as the public version linked here.
141 points · Open discussion
Ah, I make it compile partial HTML (just page content), and stick that into my own HTML page template(s) (written as HEREDOCS :D). That's part of the joy of using Pandoc. I can pipeline it, no problem. Like this: cf. https://github.com/adityaathalye/shite/blob/master/bin/templ... cat "${watch_dir}/sources/${url_slug}" | __shite_templating_compile_source_to_html ${file_type} | __shite_templating_wrap_content_html ${content_type} ${watch_dir} | __shite_templating_wrap_page_html \ > "${watch_dir}/public/${html_url_slug}" Templates look like this. Notice the $(cat -) in the middle. That's how the HTML content produced by Pandoc gets injected in the middle of everything else. shite_template_common_default_page() { local maybe_page_id=${shite_page_data[page_id]:+"id=\"${shite_page_data[page_id]}\""}
Read the rest
local maybe_canonical_url=${shite_page_data[canonical_url]:+"<link rel=\"canonical\" href=\"${shite_page_data[canonical_url]}\">"} cat <<EOF <!DOCTYPE html> <html lang="en"> <head> $(shite_template_common_meta) $(shite_template_common_links) ${maybe_canonical_url} </head> <body ${maybe_page_id}> <div id="the-very-top" class="stack center box"> $(shite_template_common_header) <main id="main"> $(cat -) </main> $(shite_template_common_footer) </div> </body> </html> EOF } edit: substantiate Pandoc's role.
In Pandoc 3.0
Pandoc powers my little static site maker: cf. https://github.com/adityaathalye/shite/blob/master/bin/templ... __shite_templating_compile_source_to_html() { # If content has front matter metadata, it is presumed to be in a format # that the content compiler can safely process and elide or ignore. local file_type=${1:?"Fail. We expect file type of content like html, org, md etc."} case ${file_type} in html ) pandoc -f html -t html ;; md ) pandoc -f markdown -t html ;; org ) pandoc -f org -t html ;; esac }
In Pandoc 3.0

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.