Commit graph

119 commits

Author SHA1 Message Date
fe084d50ac add image content types to PhysicalDir 2025-01-24 21:17:53 +01:00
1423483b5c fix permalinks
looks like I mistakenly used the branch's `html_id` rather than the `named_id` when generating URLs...
2025-01-24 20:11:13 +01:00
fbb9f39353 generate subpage listings automatically
right now very barebones!

- doesn't sort pages quite correctly
- no search function
- still not sure about the UI design aspects

includes refactor of tree generation code
2025-01-18 20:33:55 +01:00
62c272ff62 add option to bust cache globally 2025-01-15 11:28:00 +01:00
cf29293fd6 add missing text/css content type 2025-01-15 10:59:01 +01:00
20e29e3b2c add support for server-side redirects 2025-01-14 23:36:24 +01:00
143be85416 add explicit content types to VFS
this allows us to serve a precise Content-Type header for all our pages, rendering treehouse usable in browsers that require one
(like terminal browsers---w3m, lynx)
2025-01-14 23:10:01 +01:00
1953b649cf make dates rendered server-side & consistently in YYYY-MM-DD format
client-side time zone adjustment still persists---the server renders them out in UTC, but the client will adjust the date to its timezone during loading. 
this shouldn't cause any layout shifting because we use `font-variant-numeric: tabular-nums` (though Recursive seems to use tabular numbers either way.)
2025-01-13 22:40:13 +01:00
74baa61122 make the 🔗 button copy branch links to clipboard
to accomplish this, I generalised emoji tooltips to a shared Tooltip class.
in the long run I'd like to transform all existing `title=""` tooltips into these for stylistic consistency with the rest of the website, but this is good enough for now.

I also ended up cleaning up some old code from before the /b rework.
2025-01-12 17:58:20 +01:00
c537eb844f change the way branch permalinks work
branch permalinks still use /b, but /b?abc now acts as a redirect rather than doing annoying JavaScript garbage
I changed the branch element ID format to accomodate this---now the IDs are of form `b-{id}` rather than `{tree_path}:{id}`.
the old way was stupid anyways.

I hope nothing breaks too majorly because of this.
2025-01-12 00:28:48 +01:00
93c24859d0 games / reflections on Minecraft 2025-01-04 23:21:31 +01:00
6d3037791a make the command line a bit more accessible by including a :| icon at the bottom
also add a few extra commands for navigating around the house
2024-12-10 20:41:14 +01:00
0ce7f50285 add image upload feature in dev mode 2024-12-08 12:45:44 +01:00
2e1e64ae8c add SVG size computation to ImageSizeCache
based on a very simple reading of the SVG's XML to find out its `width`, `height` and `viewBox`
no further parsing is required or will be provided
and you are an excellent test subject
2024-11-30 20:45:53 +01:00
f518d7a0ff remove id attribute from pages
really, use the one from branches instead
2024-11-29 22:55:16 +01:00
600651ec16 change vfs API to something akin to the deleted std provider API
this gives us a _much_ easier time with composing file systems, since you can call `query` on the inner file system and all the magic will be done for you
the overhead is technically slightly higher, but seems to be drowned out by other more expensive stuff; i couldn't measure a difference in my traces
2024-11-29 22:48:30 +01:00
55b6a0df96 implement RSS feeds 2024-11-28 22:42:49 +01:00
2e14197fd1 further breaking up treehouse::generate into smaller submodules 2024-11-27 19:02:54 +01:00
fd40f99810 split treehouse::generate apart into smaller modules 2024-11-27 18:46:29 +01:00
0713b59063 refactoring: remove dependency on SimpleFiles, make tree parsing multithreaded 2024-11-26 23:55:32 +01:00
5de308c0c4 load syntaxes in parallel 2024-11-26 22:09:52 +01:00
a8773aac63 remove unused imports 2024-11-26 22:00:08 +01:00
07419ca702 add tracing to the treehouse as an instrumenting profiler
to create a trace of the treehouse's startup, use `--trace file.json`
2024-11-26 21:56:59 +01:00
41fa245150 rudimentary search engine optimisation (robots.txt, <meta name="robots"> in /b) 2024-11-24 14:50:28 +01:00
645ae598f2 make it impossible to fill up an unbounded amount of memory with caches
yeah storing Nones there is probably not a great idea isn't it
2024-11-23 22:34:03 +01:00
8461812935 make applying edits work correctly
turns out they weren't quite working due to me being a dummy and not awaiting my asyncs
2024-11-23 22:18:21 +01:00
5193fc2be0 pre-warm content cache
in parallel!
2024-11-23 21:43:58 +01:00
42eaa326ab add content cache to generated pages
just so that we don't waste work regenerating them over and over again -w-
2024-11-23 21:43:58 +01:00
9022fb4ce9 add image size metadata to the filesystem 2024-11-23 21:43:58 +01:00
5ce9cfc022 add live reloading to the client 2024-11-23 21:43:58 +01:00
7169e65244 implement a blake3 content version layer for cache busting
works pretty much the same as our previous `?cache` parameter, but is implemented in a less ad-hoc way
2024-11-23 21:43:58 +01:00
32f25ce863 implement generation of simple templates (/sandbox) 2024-11-23 21:43:58 +01:00
377fbe4dab introduce the virtual filesystem everywhere
this unfortunately means I had to cut some features (bye bye commit history! for now)
stuff's not quite 100% working just yet (like branch links, which were and are still broken)
we also don't have content_version impls just yet
2024-11-23 21:43:58 +01:00
db0329077e refactors: replacing config derived data with vfs, removing markdown 2024-11-23 21:43:58 +01:00
1e1b8df457 refactor: introduce virtual file system as a central router for source and target data 2024-11-23 21:43:58 +01:00
d13abe7afa restructuring page:index 2024-11-12 22:51:58 +01:00
d68855a73f fix missing root breadcrumb on history pages 2024-11-04 22:50:16 +01:00
523a364fa9 switch the layout to a wider one that leans slightly to the left of the page
this is to make space on the right for a nice background in the future
2024-10-30 23:02:47 +01:00
bbf5c3b529 make fix cli accept a - argument to indicate reading from stdin
I'm pretty sure we had this in the past... no?
I have my helix set up to respect this argument, so it's weird it stopped working at some point.
2024-09-29 14:33:45 +02:00
43bf0a7c3c use vendored libgit2 without HTTPS / SSH support
we only read the repository so we don't need HTTPS and SSH support
dynamic linking causes headaches on NixOS which I use for hosting the treehouse
2024-09-29 00:14:50 +02:00
c58c07d846 version history MVP
implement basic version history support; there's now an icon in the footer that lets you see the previous versions and their sources
I'm a bit worried about spoilers but honestly it's yet another way to hint yourself at the cool secrets so I don't mind
2024-09-28 23:45:06 +02:00
e1fe9fde11 more on haku, highlighting fixes 2024-07-26 23:21:02 +02:00
b505c1bcfe haku: a very shitty tree-walk interpreter 2024-07-25 23:12:26 +02:00
2a68cfbf63 update issues 2024-07-24 18:20:12 +02:00
87ead3be17 moving some things around; fixed import maps not being deterministic 2024-07-22 20:01:58 +02:00
10ccb250c1 add site-wide JS caching through import maps 2024-07-20 23:38:30 +02:00
f3aee8f41a make emojis cached 2024-07-19 20:05:02 +02:00
e44d5babca add image sizes to emoji 2024-07-19 19:52:33 +02:00
9bf3409197 caching static resources 2024-07-19 19:13:55 +02:00
d968da10a0 refreshing pages & look and feel a bit
hopefully the new :folder: and :page: icons help you navigate the hobby corners better
2024-06-13 21:18:41 +02:00