← Commit history

Publish 3.9.7

Colby Knox ·e67f5a9fb5 ·2mo ago ·parent d2f1287
3 files changed +52−4
SKILL.md+36
@@ -81,6 +81,42 @@ differ for members). Render any repo file as the page would show it with `adom-wiki page render <owner>/<slug> <path>`. To stop shadowing, delete the HTML variant from the page repo and README.md takes over again. +### Making an HTML readme render right: sizing, sandbox, limits++An HTML readme renders in a SANDBOXED, AUTO-RESIZING iframe (scripts run; no+same-origin, no cookies, no access to the wiki page's DOM). The frame does not+know your content's height, so if you do nothing it sits at a 600px fallback and+your page is a tiny scrolly box. Report your height and the parent fits the frame+to it:++    <script>+      function fit(){ parent.postMessage({type:"readme-height",height:document.documentElement.scrollHeight},"*"); }+      addEventListener("load", fit);+      new ResizeObserver(fit).observe(document.documentElement); // re-fit on image loads / toggles+    </script>++The parent clamps the reported height to [120, cap]. The cap defaults to 16000px;+a tall page raises it up to 32000 with a meta tag in `<head>`:++    <meta name="readme-max-height" content="32000">++The server bounds that value to 600..32000, so the tag MOVES the ceiling, it never+removes it. If a long readme looks cut off at the bottom, this is why: add the+reporter, and the meta tag if the content exceeds 16000px.++The parent honors two more postMessages: `{type:"readme-lightbox",src}` opens a+full-viewport image zoom hosted by the page (src must be `https://`, a same-origin+`/path`, or a `data:image/` URI). And it forwards the page URL's `#hash` INTO the+frame as `{type:"readme-hash",hash}`, so you can deep-link a readme section: give+your headings ids, listen for that message, find the element, and post+`{type:"readme-scroll-to",top:el.offsetTop}` back.++SANDBOX LIMITS. Scripts run, but `connect-src` is the wiki origin only: you cannot+`fetch()` an arbitrary origin, so INLINE your assets (JS, JSON, fonts as data+URIs). No cookies, no real-origin storage, no direct access to the wiki page;+communicate with the page only through `postMessage`. A `readme.html` over 4 MiB+is refused (`README_TOO_LARGE`). Keep it lean; large media are page assets.+ ## Package vs release: install payload vs downloadable binaries  These are different things; do not conflate them.
package.json+8−2
@@ -1,7 +1,7 @@ {   "slug": "wiki",   "title": "Adom Wiki",-  "version": "3.9.6",+  "version": "3.9.7",   "type": "skill",   "org": "adom",   "description": "How the Adom Wiki (wiki.adom.inc) works and how to drive it with the adom-wiki CLI: the two storage layers (git page repo vs package registry), hosting source by pushing files (not a tarball), making packages, cutting per-platform releases, and the three-tier skill layout (user skills ship, dev-skills/ and publish-skills/ stay source-only). adom-wiki is the current tool; adompkg is deprecated. Read this first before publishing or installing.",@@ -26,7 +26,13 @@     "custom html readme",     "readme not updating",     "my readme edit is invisible",-    "readme.public.html"+    "readme.public.html",+    "resize the readme iframe",+    "my readme is a tiny scrolly box",+    "readme cut off at the bottom",+    "readme too tall or clipped",+    "readme.html sizing",+    "readme iframe height"   ],   "discovery_pitch": "Read this before you publish, host source, share a tool, or install from wiki.adom.inc: the two storage layers, source vs release, and the three-tier skill layout.",   "sample_prompts": [
page.json+8−2
@@ -1,6 +1,6 @@ {   "slug": "wiki",-  "version": "3.9.6",+  "version": "3.9.7",   "type": "skill",   "org": "adom",   "description": "How the Adom Wiki (wiki.adom.inc) works and how to drive it with the adom-wiki CLI: the two storage layers (git page repo vs package registry), hosting source by pushing files (not a tarball), making packages, cutting per-platform releases, and the three-tier skill layout (user skills ship, dev-skills/ and publish-skills/ stay source-only). adom-wiki is the current tool; adompkg is deprecated. Read this first before publishing or installing.",@@ -39,7 +39,13 @@     "custom html readme",     "readme not updating",     "my readme edit is invisible",-    "readme.public.html"+    "readme.public.html",+    "resize the readme iframe",+    "my readme is a tiny scrolly box",+    "readme cut off at the bottom",+    "readme too tall or clipped",+    "readme.html sizing",+    "readme iframe height"   ],   "discovery_pitch": "Read this before you publish, host source, share a tool, or install from wiki.adom.inc: the two storage layers, source vs release, and the three-tier skill layout.",   "sample_prompts": [