From 97a11e4413c714466345e44887a414bde81261eb Mon Sep 17 00:00:00 2001 From: Aleksandr Shevchuk Date: Sun, 15 Nov 2026 00:24:35 +0200 Subject: [PATCH 1/2] Pin h5p-author 0.10.0 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 5c3facd..75d6f8f 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@codemirror/state": "6.7.6", "@codemirror/view": "6.43.15", "@lezer/highlight": "1.2.5", - "@missing-elements/h5p-author": "0.9.8", + "@missing-elements/h5p-author": "0.10.0", "@missing-elements/h5p-libraries": "1.1.0", "@missing-elements/h5p-offline-player": "1.6.0", "@missing-elements/h5p-runtime": "1.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4591457..debda43 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 1.2.5 version: 1.2.5 '@missing-elements/h5p-author': - specifier: 0.9.8 - version: 0.9.8(@missing-elements/h5p-runtime@1.0.1) + specifier: 0.10.0 + version: 0.10.0(@missing-elements/h5p-runtime@1.0.1) '@missing-elements/h5p-libraries': specifier: 1.1.0 version: 1.1.0 @@ -155,8 +155,8 @@ packages: '@marijn/find-cluster-break@1.0.4': resolution: {integrity: sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==} - '@missing-elements/h5p-author@0.9.8': - resolution: {integrity: sha512-w98Cii8n5/46skRj6rXbbdTSIJrpcli2550ZTkQ9Q0m8/nK/3+hK9uDbldM6B56el6Mc/FI1ncByntmD26YFpw==} + '@missing-elements/h5p-author@0.10.0': + resolution: {integrity: sha512-qbaMpTmaBEkB/7tRP5L+peVCBtxBprApF0SdUSKIM+So/MSkCLmRvNdLHtBKJKG5n44o7C5IbUFqGwHp9Metsg==} engines: {node: '>=22'} hasBin: true @@ -1247,7 +1247,7 @@ snapshots: '@marijn/find-cluster-break@1.0.4': {} - '@missing-elements/h5p-author@0.9.8(@missing-elements/h5p-runtime@1.0.1)': + '@missing-elements/h5p-author@0.10.0(@missing-elements/h5p-runtime@1.0.1)': dependencies: '@missing-elements/h5p-libraries': 1.1.0 '@missing-elements/h5p-normalize': 1.3.0 From 86a604e533f1b2085198a216a1a5a07d2743eeec Mon Sep 17 00:00:00 2001 From: Aleksandr Shevchuk Date: Sun, 15 Nov 2026 00:33:11 +0200 Subject: [PATCH 2/2] Serve the h5p-author skill only as zips: its text files are no longer served one by one --- README.md | 6 +-- eleventy.config.js | 7 --- src/_data/skill.js | 21 ++------ src/h5p/skill/index.json.11ty.js | 5 -- src/h5p/skill/index.njk | 82 +++++++++++--------------------- src/sitemap.njk | 4 +- vite.config.ts | 14 +++--- 7 files changed, 47 insertions(+), 92 deletions(-) delete mode 100644 src/h5p/skill/index.json.11ty.js diff --git a/README.md b/README.md index 800bb3b..a36476c 100644 --- a/README.md +++ b/README.md @@ -10,13 +10,13 @@ The site of the [missing-elements](https://github.com/missing-elements) web comp | `/pdfjs-viewer/` | The docs of ``, with a live preview | [src/pdfjs-viewer/](src/pdfjs-viewer/) | | `/h5p/build/` | The build page, for people: what it makes, a sample that plays, and the build of a chat's source into a `.h5p`, in the visitor's browser | [src/h5p/build/](src/h5p/build/) | | `/h5p/create-with-ai/` | The how-to, for people: installing the skill, asking a chat, the prompts to start from, the types, and what to do when something goes wrong | [src/h5p/create-with-ai/](src/h5p/create-with-ai/) | -| `/h5p/skill/` | The skill as zips to install: `h5p-author.zip` for Claude and Grok, `h5p-author-chatgpt.zip` for ChatGPT's Plugins; and its files, with a page that lists each at its full address, which no page links to | [src/h5p/skill/](src/h5p/skill/), copied by [eleventy.config.js](eleventy.config.js); the zips written by [vite.config.ts](vite.config.ts) | +| `/h5p/skill/` | The skill as zips to install: `h5p-author.zip` for Claude and Grok, `h5p-author-chatgpt.zip` for ChatGPT's Plugins; and a page that lists them and the bundles' addresses, each in full, which no page links to | [src/h5p/skill/](src/h5p/skill/); the zips written by [vite.config.ts](vite.config.ts) | | `/h5p/bundles/` | The skill's build tool and a library bundle per content type, for a chat that runs Node but cannot reach npm; and `h5p-author-build.tar.gz`, the tool and every library in one archive, for a person to attach to a chat whose code can download nothing | written by [vite.config.ts](vite.config.ts) | | `/h5p/build/types/` | The skill's type files, which the build page copies for the chat | written by [vite.config.ts](vite.config.ts) | A chat takes the skill installed: from a zip in Claude, ChatGPT and Grok, or with `npx skills add` in an agent with a terminal, as `/h5p/create-with-ai/` says. Where the skill cannot reach npm, it builds from the tool and a bundle in `/h5p/bundles/`, at the addresses `/h5p/skill/` lists, if it can run Node and fetch a file: Grok did, on 2026-11-13. Where its code runs Node but can fetch nothing, as in ChatGPT, it builds from `h5p-author-build.tar.gz` once the person attaches it, and otherwise gives them a link to `/h5p/build/`, which builds in their browser. The tool is a Node.js program, so a chat whose code runs no Node, as most chat apps for local models, takes the link; an agent with a terminal and a local model builds offline from the archive. -Until 2026-11-13 the site's prompts sent a chat to read the skill at `/h5p/skill/` instead. That worked only in chats that now take the zip, so the prompts name the installed skill, and no page links to `/h5p/skill/`. Its page and files stay: the copies of the skill already installed name that address, and so do the prompts people copied before. +Until 2026-11-13 the site's prompts sent a chat to read the skill at `/h5p/skill/` instead. That worked only in chats that now take the zip, so the prompts name the installed skill, and no page links to `/h5p/skill/`. Its page stays, for the skill's route 3 and the copies already installed, which take the bundles' addresses from it. The skill's text files were served there one by one too until h5p-author 0.10.0: the zips carry them, so the site serves them only as zips. A copy of 0.9.7 or older, in a chat that has its text alone, and a prompt copied before 2026-11-13 find no files there now. ## Develop @@ -44,7 +44,7 @@ The pages run published releases, pinned exactly in [package.json](package.json) | Package | What it moves | | --- | --- | | `@missing-elements/pdfjs-viewer` | The docs' version numbers, and the viewer in the live preview | -| `@missing-elements/h5p-author` | The build the build page runs, its sample, the type files, the skill's files at `/h5p/skill/`, and the tool in `/h5p/bundles/` | +| `@missing-elements/h5p-author` | The build the build page runs, its sample, the type files, the skill's zips at `/h5p/skill/`, and the tool in `/h5p/bundles/` | | `@missing-elements/h5p-libraries` | The library pack: the build page's libraries, and the bundles | | `@missing-elements/h5p-offline-player`, `@missing-elements/h5p-runtime` | The player on the build page, and its runtime | diff --git a/eleventy.config.js b/eleventy.config.js index a128bde..81c732d 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -16,13 +16,6 @@ export default function (eleventyConfig) { eleventyConfig.addPassthroughCopy("src/pdfjs-viewer/docs.js"); // The docs run the exact package version they describe, served from this site. eleventyConfig.addPassthroughCopy({ "node_modules/@missing-elements/pdfjs-viewer/dist": "pdfjs-viewer/vendor" }); - // The h5p-author skill, as the pinned author package carries it, listed by src/h5p/skill/. - const author = "node_modules/@missing-elements/h5p-author"; - eleventyConfig.addPassthroughCopy({ - [`${author}/SKILL.md`]: "h5p/skill/SKILL.md", - [`${author}/LICENSE`]: "h5p/skill/LICENSE", - [`${author}/references`]: "h5p/skill/references", - }); // A page with a Content-Security-Policy (`csp` in its front matter, written first in by // base.njk, and holding no double quote) allows its inline scripts by hash, as they are written: diff --git a/src/_data/skill.js b/src/_data/skill.js index 6e2880b..0dcf10f 100644 --- a/src/_data/skill.js +++ b/src/_data/skill.js @@ -1,27 +1,20 @@ -import { existsSync, readdirSync, readFileSync } from "node:fs"; -import { join, relative, sep } from "node:path"; +import { existsSync, readFileSync } from "node:fs"; import { contentTypes, openPack } from "@missing-elements/h5p-author"; -// The h5p-author skill as the pinned @missing-elements/h5p-author carries it since 0.9.0: its -// SKILL.md, licence and references/, which eleventy.config.js copies to /h5p/skill/ as they are. -// src/h5p/skill/ lists them, each at its full address. +// The h5p-author skill as the pinned @missing-elements/h5p-author carries it since 0.9.0. The site +// serves it only as the zips vite.config.ts writes to /h5p/skill/: its text files are not served +// one by one, since every chat it is offered to installs it (README.md). const author = "node_modules/@missing-elements/h5p-author"; const { version } = JSON.parse(readFileSync(`${author}/package.json`, "utf8")); if (!existsSync(`${author}/SKILL.md`)) throw new Error(`@missing-elements/h5p-author ${version} carries no SKILL.md: 0.9.0 is the first that does`); -const references = readdirSync(`${author}/references`, { recursive: true, withFileTypes: true }) - .filter((entry) => entry.isFile()) - .map((entry) => relative(author, join(entry.parentPath, entry.name)).split(sep).join("/")) - .sort(); -const types = references.filter((path) => path.startsWith("references/types/")); - // The rows of SKILL.md's table of the content types it offers the user to choose from (its step 1): // a type, and what it is for, with the media it plays in brackets where it needs the user's. const rows = [...readFileSync(`${author}/SKILL.md`, "utf8").matchAll(/^\| (H5P\.\w+) \| (.+?) \|$/gm)]; if (!rows.length) throw new Error(`@missing-elements/h5p-author ${version}: SKILL.md has no table of content types`); const sentence = (text) => text[0].toUpperCase() + text.slice(1); -// What a build where npm cannot be reached fetches (SKILL.md's step 3), which vite.config.ts +// What a build where npm cannot be reached fetches (the skill's route 3), which vite.config.ts // writes to /h5p/bundles/ after this page: the command line, and a bundle per content type, named // by the author package's own list of them, the one its `writeBundles` writes from. const pack = await openPack(); @@ -44,11 +37,7 @@ const offered = rows.map(([, type, text]) => { export default { version, - // What SKILL.md names and the type files, apart, as the page lists them; `files` is every one. - named: [...references.filter((path) => !types.includes(path)), "LICENSE"], - types, offered, - files:["SKILL.md", ...references.filter((path) => !types.includes(path)), "LICENSE", ...types], // In /h5p/bundles/, the tool first. bundles: ["h5p-author.mjs", ...bundles], }; diff --git a/src/h5p/skill/index.json.11ty.js b/src/h5p/skill/index.json.11ty.js deleted file mode 100644 index 6553811..0000000 --- a/src/h5p/skill/index.json.11ty.js +++ /dev/null @@ -1,5 +0,0 @@ -// /h5p/skill/index.json: the author package's version and every file of the skill served here -// (src/_data/skill.js), for a script. -export const data = { permalink: "/h5p/skill/index.json", eleventyExcludeFromCollections: true }; - -export const render = ({ skill }) => `${JSON.stringify({ author: skill.version, files: skill.files }, null, 2)}\n`; diff --git a/src/h5p/skill/index.njk b/src/h5p/skill/index.njk index 921ca91..fed4269 100644 --- a/src/h5p/skill/index.njk +++ b/src/h5p/skill/index.njk @@ -1,19 +1,20 @@ --- layout: base.njk title: The h5p-author skill ยท Missing Elements -description: The h5p-author skill's files and those its build fetches, each at its full address, for an AI chat that cannot install the skill. +description: The h5p-author skill's zips to install, and the files its build fetches where npm cannot be reached, each at its full address. # No script but the site's: base.njk writes the policy first in , and the color-scheme script # is added to script-src by its hash at build (eleventy.config.js). csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; object-src 'none'; base-uri 'self'" --- {#- No page of the site links here since 2026-11-13, when its prompts stopped sending a chat to read the skill from this page: the skill is installed, which is the guide's first step. The page - stays for what names its address: the copies of the skill already installed, which take the - build tool's and the bundles' addresses from it where npm cannot be reached (SKILL.md's step - 3, as Grok built on 2026-11-13), and the prompts people copied before. The zips are served - from this folder too. -#} + stays for what names its address: the skill's route 3, and the copies of it already installed, + which take the build tool's and the bundles' addresses from it where npm cannot be reached (as + Grok built on 2026-11-13). The zips are served from this folder too. Its text files are not: + the zips carry them, and a chat with the text alone, which read them here until 0.9.7, is one + the skill is no longer offered to (the owner, 2026-11-15). -#} {#- Every address is written out whole, as its link's text too: a chat's fetch tool may open only - the addresses it has seen in full, and a relative link, or SKILL.md's , is none. -#} + the addresses it has seen in full, and a relative link is none. -#} {%- set base = site.url + "/h5p/skill/" -%} {%- set bundlesBase = site.url + "/h5p/bundles/" -%} {% include "topbar.njk" %} @@ -22,74 +23,49 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; o

The h5p-author skill

- Its files and those its build fetches, each at its full address, for an AI chat that cannot - install the skill. + Its zips to install, and the files its build fetches where npm cannot be reached, each at its + full address.

{#- A person opens this address too, to see what a prompt sends their chat to: they are told - what it is, that none of it is theirs to open or install, and where the page for them is. -#} + what it is, and where the pages for them are. -#}

- For a person reading this: the page is written for an AI chat. It lists - the instructions that tell a chat how to write an H5P activity, as text files anyone can - read, and a person has nothing here to open or install. The page that makes an activity is + For a person reading this: the page is written for an AI chat. To install + the skill, follow + {{ site.url }}/h5p/create-with-ai/#install. + The page that makes an activity is {{ site.url }}/h5p/build/.

- Read SKILL.md first and follow its steps. A file it names, such as - references/authoring.md or a content type's references/types/<Type>.md, - is the one listed here under that path, and a bundle its step 3 fetches is listed last. These - are the files of h5p-author {{ skill.version }}, the release the build page at - {{ site.url }}/h5p/build/ runs. -

-

- Where skills can be installed, install it instead: - npx skills add missing-elements/h5p-offline-player --skill h5p-author, or in - Claude, ChatGPT or Grok from the zips at - {{ site.url }}/h5p/create-with-ai/#install. + These are the files of h5p-author {{ skill.version }}, the release the build page at + {{ site.url }}/h5p/build/ runs. The skill's text is in + the zips, and on + GitHub.

- {#- The sections are steps, in the order a chat reads them, drawn as the build page's timeline - (site.css). The lists are drawn without bullets, and Safari then reads one as a list only if - it is told. -#} -
-

1 Read first

- -
- -
-

2 The files it names

-
    - {%- for path in skill.named %} -
  • {{ base }}{{ path }} - {%- if path == "references/authoring.md" %}: the brief, read once - {%- elif path == "LICENSE" %}: the skill's licence, MIT, which goes with it{% endif %}
  • - {%- endfor %} -
-
- -
-

3 A content type's file

+ {#- The sections are drawn as the build page's timeline (site.css). The lists are drawn without + bullets, and Safari then reads one as a list only if it is told. -#} +
+

1 Install the skill

- One per content type: its notes, an example and its fields. Read the file of the type the - source is written in, and those of the parts it holds, such as H5P.AdvancedText or H5P.Image. + In an agent with a terminal: + npx skills add missing-elements/h5p-offline-player --skill h5p-author. In a chat + app, from a zip:

-

4 To build where npm cannot be reached

+

2 To build where npm cannot be reached

The build tool, which runs with Node and nothing installed, and a bundle per content type: the libraries a build of that type reads. Fetch the tool and the bundle of the source's own - type, as step 3 of SKILL.md says. + type, as the skill says.

    {%- for file in skill.bundles %} diff --git a/src/sitemap.njk b/src/sitemap.njk index 6c9c485..fdc7075 100644 --- a/src/sitemap.njk +++ b/src/sitemap.njk @@ -3,8 +3,8 @@ permalink: /sitemap.xml eleventyExcludeFromCollections: true --- -{#- The site's pages, for search engines: what is written as HTML. A data file such as - /h5p/skill/index.json is a template too, and the skill's files are copied, not written. -#} +{#- The site's pages, for search engines: what is written as HTML, since a template may write + another kind of file. -#} {%- for entry in collections.all %} {%- if entry.outputPath and entry.outputPath.endsWith(".html") %} diff --git a/vite.config.ts b/vite.config.ts index aaf3e22..c9ae14e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -21,10 +21,12 @@ import { build, defineConfig, type Plugin } from 'vite' * - `/h5p/build/sample.h5p` and `sample.json`, the sample the page plays where it is opened with no * source, and its source (see `sample()`). * - `/h5p/bundles/`, for a chat that reaches no npm registry (see `bundles()`). + * - `/h5p/skill/h5p-author.zip` and `h5p-author-chatgpt.zip`, the h5p-author skill to install (see + * `skillZips()`). * - * `/h5p/skill/`, the h5p-author skill's files and a page of their addresses, is Eleventy's - * (`eleventy.config.js`, `src/h5p/skill/`). The page lists the bundles too, written before them: - * it names them from the author package's `contentTypes`, the list `writeBundles` writes from. + * `/h5p/skill/`'s page, which lists the zips and the bundles' addresses, is Eleventy's + * (`src/h5p/skill/`). It is written before the bundles: it names them from the author package's + * `contentTypes`, the list `writeBundles` writes from. * * Moved here from embed-my.github.io's `/build` and `/bundles/` (#7). */ @@ -278,8 +280,8 @@ function tarGz(files: ReadonlyArray): Buffer { } /** - * The h5p-author skill as zips to install, beside the files `/h5p/skill/` serves, from the same - * pinned author package: + * The h5p-author skill as zips to install, in `/h5p/skill/`, from the pinned author package. They + * are the only way the site serves the skill's text: every chat it is offered to installs it. * * - `h5p-author.zip`: the skill's folder at the zip's root, `h5p-author/SKILL.md`, which Claude's * app takes under Customize, Skills, and Grok's under Skills, Import (as does Open WebUI's @@ -308,7 +310,7 @@ function skillZips(): Plugin { }, async writeBundle() { const { version } = JSON.parse(await readFile(new URL('package.json', author), 'utf8')) as { version: string } - // The files eleventy.config.js copies to /h5p/skill/: SKILL.md, the licence and references/. + // The skill's files as the package carries them: SKILL.md, the licence and all of references/. const references = readdirSync(new URL('references/', author), { recursive: true, withFileTypes: true }) .filter((entry) => entry.isFile()) .map((entry) => join(entry.parentPath, entry.name).slice(fileURLToPath(author).length).split('\\').join('/'))