Skip to content

Bundle asset files instead of encoding to base64 strings#103

Closed
videah wants to merge 1 commit intofreecomputinglab:mainfrom
videah:feat/html-asset-bundling
Closed

Bundle asset files instead of encoding to base64 strings#103
videah wants to merge 1 commit intofreecomputinglab:mainfrom
videah:feat/html-asset-bundling

Conversation

@videah
Copy link
Copy Markdown

@videah videah commented Mar 30, 2026

I've been really enjoying my time using rheo but I really need #100 to be fixed to use it for more serious projects, so I used Claude to help take a stab at it (I hope that's ok, if you think this is just slop feel free to close)

It looks for uses of #image and substitutes it for its own html.elem linking to the image in the assets folder, which it will get copied to at build time.

This also adds an #asset-path for linking to non-image files and returns the path to it, I can't really think of a better name for this so feel free to tweak it. I had considered hooking it up to #link like the relative linking system, but I wasn't sure if that was maybe too much.

@videah videah marked this pull request as draft March 30, 2026 03:43
- Extracts inline base64 images to external asset files in HTML output
- Adds #asset-path() function and #image show rule for HTML assets
- Follows #include/#import for image discovery with alt text forwarding
- Injects #asset-path() into included files via per-file preamble
- Supports dynamic paths in #asset-path() and #image show rule
- Copies config assets preserving relative paths from content root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@videah videah force-pushed the feat/html-asset-bundling branch from ac8d03b to 228aad8 Compare March 30, 2026 04:20
@breezykermo
Copy link
Copy Markdown
Contributor

Closing according to the reasoning in #100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants