<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Components%2Fweb%2FASSETS</id>
	<title>MindAttic.Components/web/ASSETS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Components%2Fweb%2FASSETS"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/web/ASSETS&amp;action=history"/>
	<updated>2026-12-06T14:00:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/web/ASSETS&amp;diff=556&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/web/ASSETS&amp;diff=556&amp;oldid=prev"/>
		<updated>2026-11-29T20:25:41Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Runtime assets — the shared jsDelivr package =&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;web/&amp;lt;/code&amp;gt; folder of MindAttic.Components (formerly MindAttic.Web.Shared) is also the &amp;lt;strong&amp;gt;shared runtime asset package&amp;lt;/strong&amp;gt; for every MindAttic site. Fonts, images, brand art, theme art and the Cyberspace effect textures live here once, as plain static files, and every site loads them over jsDelivr instead of embedding them in its HTML ([[MindAttic.Components/web/BIBLE|BIBLE §2]], [[MindAttic.Components/web/BIBLE|MAU-LAW-7]]).&lt;br /&gt;
&lt;br /&gt;
== URL pattern ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code&amp;quot;&amp;gt;https&amp;amp;#58;//cdn.jsdelivr.net/gh/mindattic/MindAttic.Components@&amp;amp;lt;tag&amp;gt;/web/&amp;amp;lt;path&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;tag&amp;gt;&amp;lt;/code&amp;gt; is a whole-number release tag of MindAttic.Components (&amp;lt;code&amp;gt;V1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;V2&amp;lt;/code&amp;gt;, …) and &amp;lt;strong&amp;gt;tags are immutable&amp;lt;/strong&amp;gt; ([[MindAttic.Components/web/BIBLE|MAU-LAW-6]]), so a pinned URL returns the same bytes forever and is cached by browsers and by the CDN edge indefinitely. Never point a production page at &amp;lt;code&amp;gt;@main&amp;lt;/code&amp;gt;. The pages pin the newest whole-number &amp;lt;code&amp;gt;V&amp;amp;lt;n&amp;gt;&amp;lt;/code&amp;gt; tag of this repo (or the tag the linked deploy passes as &amp;lt;code&amp;gt;-Tag&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Layout ==&lt;br /&gt;
&lt;br /&gt;
A site&amp;#039;s own assets live in &amp;lt;code&amp;gt;assets/&amp;amp;lt;domain&amp;gt;/&amp;lt;/code&amp;gt;; a file a component or theme cannot work without stays with it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code&amp;quot;&amp;gt;web/&lt;br /&gt;
├── assets/&lt;br /&gt;
│   ├── mindattic.com/logos/           m-monogram.png, m-icon-16.png, favicon.ico&lt;br /&gt;
│   ├── mindatticcares.com/&lt;br /&gt;
│   │   ├── logos/  icons/  images/&lt;br /&gt;
│   ├── ryandebraal.com/images/        ryan-avatar.png, ryan-portrait.png&lt;br /&gt;
│   └── archive/                       kept but not served (see below)&lt;br /&gt;
├── components/&amp;amp;lt;Name&amp;gt;/                 component-owned runtime files (CSS/JS and what they cannot work without)&lt;br /&gt;
│   ├── OutfitFont/fonts/              outfit-latin.woff2, outfit-latin-ext.woff2&lt;br /&gt;
│   ├── AtticFont/fonts/               attic.woff2&lt;br /&gt;
│   └── Cyberspace/assets/             circuitboard.00-02.png parallax textures&lt;br /&gt;
├── themes/&amp;amp;lt;Name&amp;gt;/                     theme-owned art: Noir&amp;#039;s moon, Sakura&amp;#039;s and Sunset&amp;#039;s 20 backgrounds&lt;br /&gt;
└── assets-manifest.json               generated: path, bytes, SHA-256, pixel size of every asset&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rule of thumb: &amp;lt;strong&amp;gt;used by one site → &amp;lt;code&amp;gt;assets/&amp;amp;lt;domain&amp;gt;/&amp;amp;lt;category&amp;gt;/&amp;lt;/code&amp;gt;; owned by a theme → the theme&amp;#039;s folder; a file a component cannot work without (fonts included) stays with the component.&amp;lt;/strong&amp;gt; Category folders are named for what the files are (&amp;lt;code&amp;gt;logos&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;icons&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;images&amp;lt;/code&amp;gt;), not for the page that uses them. Nothing is ever copied into two places ([[MindAttic.Components/web/BIBLE|MAU-LAW-5]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strong&amp;gt;Only what a site uses is in the package.&amp;lt;/strong&amp;gt; Files nothing references — the TTF sources of the web fonts, brand masters, art a page keeps inline — live in &amp;lt;code&amp;gt;web/assets/archive/&amp;lt;/code&amp;gt;, at the same relative path they would have in the package. They stay in the repo but are not in &amp;lt;code&amp;gt;assets-manifest.json&amp;lt;/code&amp;gt;, not in this layout and not part of the supported URLs; a test fails if a site links to &amp;lt;code&amp;gt;assets/archive/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Quality rules ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Lossy formats keep their full resolution.&amp;lt;/strong&amp;gt; A JPEG/WebP is committed byte-for-byte as received; it is never downscaled or re-encoded to save space.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Lossless recompression is welcome, but must be verified.&amp;lt;/strong&amp;gt; A PNG may be re-encoded (for example to an 8-bit palette) only if the decoded pixels are identical — the Cyberspace textures went from 6.2 MB to 1.7 MB this way, pixel-for-pixel identical.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Validate fonts before committing them.&amp;lt;/strong&amp;gt; Load every woff2 with &amp;lt;code&amp;gt;fontTools&amp;lt;/code&amp;gt; (or in a browser) — a browser silently falls back to a system font when a woff2 is corrupt, which hides the bug.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Names:&amp;lt;/strong&amp;gt; lowercase kebab-case, descriptive, no spaces; put the variant last (&amp;lt;code&amp;gt;m-cares-black-red-transparent-720.png&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Adding or changing an asset ==&lt;br /&gt;
&lt;br /&gt;
# Put the file in the right folder, using the naming rules above.&lt;br /&gt;
# &amp;lt;code&amp;gt;powershell -NoProfile -ExecutionPolicy Bypass -File web\tools\build-asset-manifest.ps1&amp;lt;/code&amp;gt;&lt;br /&gt;
# Commit the asset(s) and &amp;lt;code&amp;gt;assets-manifest.json&amp;lt;/code&amp;gt; together.&lt;br /&gt;
# Run &amp;lt;code&amp;gt;MindAttic.Deploy&amp;lt;/code&amp;gt;&amp;#039;s linked deploy (&amp;lt;code&amp;gt;npm run deploy -- --uiux&amp;lt;/code&amp;gt;): it tags MindAttic.Components with the next whole-number tag, pins it in all four sites (commit &amp;lt;code&amp;gt;Pin MindAttic.Components V&amp;amp;lt;n&amp;gt;&amp;lt;/code&amp;gt; in MindAttic.Web), pushes both repos and the tag, checks every asset on the CDN and uploads the sites. &amp;lt;strong&amp;gt;Never move or reuse a tag.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;web\tools\build-asset-manifest.ps1 -Verify&amp;lt;/code&amp;gt; fails if the manifest is stale — use it in CI (the linked deploy runs it as a preflight gate).&lt;br /&gt;
&lt;br /&gt;
== How a site consumes the package ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-html&amp;quot;&amp;gt;&amp;amp;lt;!-- in &amp;amp;lt;head&amp;gt;: open the connection early, start the fonts the first paint needs --&amp;gt;&lt;br /&gt;
&amp;amp;lt;link rel=&amp;quot;preconnect&amp;quot; href=&amp;quot;https&amp;amp;#58;//cdn.jsdelivr.net&amp;quot; crossorigin&amp;gt;&lt;br /&gt;
&amp;amp;lt;link rel=&amp;quot;preload&amp;quot; as=&amp;quot;font&amp;quot; type=&amp;quot;font/woff2&amp;quot; crossorigin&lt;br /&gt;
      href=&amp;quot;https&amp;amp;#58;//cdn.jsdelivr.net/gh/mindattic/MindAttic.Components@V3/web/components/OutfitFont/fonts/outfit-latin.woff2&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;@font-face&amp;lt;/code&amp;gt; rules themselves come from the font component&amp;#039;s &amp;lt;code&amp;gt;*.cdn.css&amp;lt;/code&amp;gt;, spliced into the page&amp;#039;s FONTS marker block by &amp;lt;code&amp;gt;web/build/build-sites.mjs&amp;lt;/code&amp;gt; with the pinned URL filled in.&lt;br /&gt;
&lt;br /&gt;
* Fonts need &amp;lt;code&amp;gt;crossorigin&amp;lt;/code&amp;gt; on the &amp;lt;code&amp;gt;&amp;amp;lt;link rel=preload&amp;gt;&amp;lt;/code&amp;gt;, otherwise the browser fetches them twice.&lt;br /&gt;
* Use &amp;lt;code&amp;gt;fetchpriority=&amp;quot;low&amp;quot;&amp;lt;/code&amp;gt; on preloads of decorative images so they never compete with the first paint.&lt;br /&gt;
* Add &amp;lt;code&amp;gt;loading=&amp;quot;lazy&amp;quot; decoding=&amp;quot;async&amp;quot;&amp;lt;/code&amp;gt; to below-the-fold &amp;lt;code&amp;gt;&amp;amp;lt;img&amp;gt;&amp;lt;/code&amp;gt; tags.&lt;br /&gt;
* Load heavy scripts with &amp;lt;code&amp;gt;defer&amp;lt;/code&amp;gt; so they never block the first paint.&lt;br /&gt;
&lt;br /&gt;
== Verifying a release ==&lt;br /&gt;
&lt;br /&gt;
After pushing a tag, check that jsDelivr serves every file at its committed size, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code&amp;quot;&amp;gt;curl -sI https&amp;amp;#58;//cdn.jsdelivr.net/gh/mindattic/MindAttic.Components@V3/web/components/AtticFont/fonts/attic.woff2&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and compare against &amp;lt;code&amp;gt;assets-manifest.json&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;bytes&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;sha256&amp;lt;/code&amp;gt;). If a brand-new tag 404s for a minute, retry; &amp;lt;code&amp;gt;https&amp;amp;#58;//purge.jsdelivr.net/gh/mindattic/MindAttic.Components@V3/web/&amp;amp;lt;path&amp;gt;&amp;lt;/code&amp;gt; forces a refresh. The linked deploy&amp;#039;s CDN gate does this check for every asset the sites use.&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;web/tests/package/&amp;lt;/code&amp;gt; holds a Playwright suite that validates this package and the sites that consume it (see its &amp;lt;code&amp;gt;README.md&amp;lt;/code&amp;gt;): the manifest matches the tree, fonts and images decode, lossy files keep their full resolution and bytes, size budgets hold, every MindAttic.Components URL a site references exists, and each site loads with no failed requests, no console errors and the right layout at every viewport — in every view a visitor can reach (hash pages, themes), with desktop-style scrollbars so overflow a Windows visitor would see is caught. The expected tag is the newest &amp;lt;code&amp;gt;V&amp;amp;lt;n&amp;gt;&amp;lt;/code&amp;gt; tag of this repo (override with &amp;lt;code&amp;gt;SHARED_TAG&amp;lt;/code&amp;gt;). &amp;lt;code&amp;gt;npm run test:local&amp;lt;/code&amp;gt; runs it against the working tree before a tag is published; &amp;lt;code&amp;gt;npm run test:live&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;npm run test:cdn&amp;lt;/code&amp;gt; verify what jsDelivr actually serves.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[MindAttic.Components]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Components/blob/main/docs/web/ASSETS.md MindAttic.Components/docs/web/ASSETS.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:MindAttic.Components]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>