Skip to content

Commit e6aab10

Browse files
authored
Merge pull request #52 from missing-elements/deps/h5p-author-0.10.0
Pin h5p-author 0.10.0, and serve its skill only as zips
2 parents 3ed1a6a + 86a604e commit e6aab10

9 files changed

Lines changed: 53 additions & 98 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ The site of the [missing-elements](https://github.com/missing-elements) web comp
1010
| `/pdfjs-viewer/` | The docs of `<pdfjs-viewer-element>`, with a live preview | [src/pdfjs-viewer/](src/pdfjs-viewer/) |
1111
| `/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/) |
1212
| `/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/) |
13-
| `/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) |
13+
| `/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) |
1414
| `/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) |
1515
| `/h5p/build/types/` | The skill's type files, which the build page copies for the chat | written by [vite.config.ts](vite.config.ts) |
1616

1717
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.
1818

19-
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.
19+
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.
2020

2121
## Develop
2222

@@ -44,7 +44,7 @@ The pages run published releases, pinned exactly in [package.json](package.json)
4444
| Package | What it moves |
4545
| --- | --- |
4646
| `@missing-elements/pdfjs-viewer` | The docs' version numbers, and the viewer in the live preview |
47-
| `@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/` |
47+
| `@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/` |
4848
| `@missing-elements/h5p-libraries` | The library pack: the build page's libraries, and the bundles |
4949
| `@missing-elements/h5p-offline-player`, `@missing-elements/h5p-runtime` | The player on the build page, and its runtime |
5050

‎eleventy.config.js‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ export default function (eleventyConfig) {
1616
eleventyConfig.addPassthroughCopy("src/pdfjs-viewer/docs.js");
1717
// The docs run the exact package version they describe, served from this site.
1818
eleventyConfig.addPassthroughCopy({ "node_modules/@missing-elements/pdfjs-viewer/dist": "pdfjs-viewer/vendor" });
19-
// The h5p-author skill, as the pinned author package carries it, listed by src/h5p/skill/.
20-
const author = "node_modules/@missing-elements/h5p-author";
21-
eleventyConfig.addPassthroughCopy({
22-
[`${author}/SKILL.md`]: "h5p/skill/SKILL.md",
23-
[`${author}/LICENSE`]: "h5p/skill/LICENSE",
24-
[`${author}/references`]: "h5p/skill/references",
25-
});
2619

2720
// A page with a Content-Security-Policy (`csp` in its front matter, written first in <head> by
2821
// base.njk, and holding no double quote) allows its inline scripts by hash, as they are written:

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@codemirror/state": "6.7.6",
2929
"@codemirror/view": "6.43.15",
3030
"@lezer/highlight": "1.2.5",
31-
"@missing-elements/h5p-author": "0.9.8",
31+
"@missing-elements/h5p-author": "0.10.0",
3232
"@missing-elements/h5p-libraries": "1.1.0",
3333
"@missing-elements/h5p-offline-player": "1.6.0",
3434
"@missing-elements/h5p-runtime": "1.0.1",

‎pnpm-lock.yaml‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/_data/skill.js‎

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
1-
import { existsSync, readdirSync, readFileSync } from "node:fs";
2-
import { join, relative, sep } from "node:path";
1+
import { existsSync, readFileSync } from "node:fs";
32
import { contentTypes, openPack } from "@missing-elements/h5p-author";
43

5-
// The h5p-author skill as the pinned @missing-elements/h5p-author carries it since 0.9.0: its
6-
// SKILL.md, licence and references/, which eleventy.config.js copies to /h5p/skill/ as they are.
7-
// src/h5p/skill/ lists them, each at its full address.
4+
// The h5p-author skill as the pinned @missing-elements/h5p-author carries it since 0.9.0. The site
5+
// serves it only as the zips vite.config.ts writes to /h5p/skill/: its text files are not served
6+
// one by one, since every chat it is offered to installs it (README.md).
87
const author = "node_modules/@missing-elements/h5p-author";
98
const { version } = JSON.parse(readFileSync(`${author}/package.json`, "utf8"));
109
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`);
1110

12-
const references = readdirSync(`${author}/references`, { recursive: true, withFileTypes: true })
13-
.filter((entry) => entry.isFile())
14-
.map((entry) => relative(author, join(entry.parentPath, entry.name)).split(sep).join("/"))
15-
.sort();
16-
const types = references.filter((path) => path.startsWith("references/types/"));
17-
1811
// The rows of SKILL.md's table of the content types it offers the user to choose from (its step 1):
1912
// a type, and what it is for, with the media it plays in brackets where it needs the user's.
2013
const rows = [...readFileSync(`${author}/SKILL.md`, "utf8").matchAll(/^\| (H5P\.\w+) \| (.+?) \|$/gm)];
2114
if (!rows.length) throw new Error(`@missing-elements/h5p-author ${version}: SKILL.md has no table of content types`);
2215
const sentence = (text) => text[0].toUpperCase() + text.slice(1);
2316

24-
// What a build where npm cannot be reached fetches (SKILL.md's step 3), which vite.config.ts
17+
// What a build where npm cannot be reached fetches (the skill's route 3), which vite.config.ts
2518
// writes to /h5p/bundles/ after this page: the command line, and a bundle per content type, named
2619
// by the author package's own list of them, the one its `writeBundles` writes from.
2720
const pack = await openPack();
@@ -44,11 +37,7 @@ const offered = rows.map(([, type, text]) => {
4437

4538
export default {
4639
version,
47-
// What SKILL.md names and the type files, apart, as the page lists them; `files` is every one.
48-
named: [...references.filter((path) => !types.includes(path)), "LICENSE"],
49-
types,
5040
offered,
51-
files:["SKILL.md", ...references.filter((path) => !types.includes(path)), "LICENSE", ...types],
5241
// In /h5p/bundles/, the tool first.
5342
bundles: ["h5p-author.mjs", ...bundles],
5443
};

‎src/h5p/skill/index.json.11ty.js‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎src/h5p/skill/index.njk‎

Lines changed: 29 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
---
22
layout: base.njk
33
title: The h5p-author skill · Missing Elements
4-
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.
4+
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.
55
# No script but the site's: base.njk writes the policy first in <head>, and the color-scheme script
66
# is added to script-src by its hash at build (eleventy.config.js).
77
csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; object-src 'none'; base-uri 'self'"
88
---
99
{#- No page of the site links here since 2026-11-13, when its prompts stopped sending a chat to read
1010
the skill from this page: the skill is installed, which is the guide's first step. The page
11-
stays for what names its address: the copies of the skill already installed, which take the
12-
build tool's and the bundles' addresses from it where npm cannot be reached (SKILL.md's step
13-
3, as Grok built on 2026-11-13), and the prompts people copied before. The zips are served
14-
from this folder too. -#}
11+
stays for what names its address: the skill's route 3, and the copies of it already installed,
12+
which take the build tool's and the bundles' addresses from it where npm cannot be reached (as
13+
Grok built on 2026-11-13). The zips are served from this folder too. Its text files are not:
14+
the zips carry them, and a chat with the text alone, which read them here until 0.9.7, is one
15+
the skill is no longer offered to (the owner, 2026-11-15). -#}
1516
{#- Every address is written out whole, as its link's text too: a chat's fetch tool may open only
16-
the addresses it has seen in full, and a relative link, or SKILL.md's <Type>, is none. -#}
17+
the addresses it has seen in full, and a relative link is none. -#}
1718
{%- set base = site.url + "/h5p/skill/" -%}
1819
{%- set bundlesBase = site.url + "/h5p/bundles/" -%}
1920
{% include "topbar.njk" %}
@@ -22,74 +23,49 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; o
2223
<header class="docs-header">
2324
<h1>The h5p-author skill</h1>
2425
<p class="lead">
25-
Its files and those its build fetches, each at its full address, for an AI chat that cannot
26-
install the skill.
26+
Its zips to install, and the files its build fetches where npm cannot be reached, each at its
27+
full address.
2728
</p>
2829
{#- A person opens this address too, to see what a prompt sends their chat to: they are told
29-
what it is, that none of it is theirs to open or install, and where the page for them is. -#}
30+
what it is, and where the pages for them are. -#}
3031
<blockquote class="for-person">
3132
<p>
32-
<strong>For a person reading this:</strong> the page is written for an AI chat. It lists
33-
the instructions that tell a chat how to write an H5P activity, as text files anyone can
34-
read, and a person has nothing here to open or install. The page that makes an activity is
33+
<strong>For a person reading this:</strong> the page is written for an AI chat. To install
34+
the skill, follow
35+
<a href="{{ site.url }}/h5p/create-with-ai/#install">{{ site.url }}/h5p/create-with-ai/#install</a>.
36+
The page that makes an activity is
3537
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a>.
3638
</p>
3739
</blockquote>
3840
<p>
39-
Read <code>SKILL.md</code> first and follow its steps. A file it names, such as
40-
<code>references/authoring.md</code> or a content type's <code>references/types/&lt;Type&gt;.md</code>,
41-
is the one listed here under that path, and a bundle its step 3 fetches is listed last. These
42-
are the files of h5p-author {{ skill.version }}, the release the build page at
43-
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a> runs.
44-
</p>
45-
<p>
46-
Where skills can be installed, install it instead:
47-
<code>npx skills add missing-elements/h5p-offline-player --skill h5p-author</code>, or in
48-
Claude, ChatGPT or Grok from the zips at
49-
<a href="{{ site.url }}/h5p/create-with-ai/#install">{{ site.url }}/h5p/create-with-ai/#install</a>.
41+
These are the files of h5p-author {{ skill.version }}, the release the build page at
42+
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a> runs. The skill's text is in
43+
the zips, and on
44+
<a href="https://github.com/missing-elements/h5p-offline-player/tree/main/skills/h5p-author">GitHub</a>.
5045
</p>
5146
</header>
5247

53-
{#- The sections are steps, in the order a chat reads them, drawn as the build page's timeline
54-
(site.css). The lists are drawn without bullets, and Safari then reads one as a list only if
55-
it is told. -#}
56-
<section class="step" aria-labelledby="first-heading">
57-
<h2 id="first-heading"><span class="step-marker"><span class="step-number">1</span></span> Read first</h2>
58-
<ul class="skill-files" role="list">
59-
<li><a href="{{ base }}SKILL.md">{{ base }}SKILL.md</a>: the skill's steps</li>
60-
</ul>
61-
</section>
62-
63-
<section class="step" aria-labelledby="named-heading">
64-
<h2 id="named-heading"><span class="step-marker"><span class="step-number">2</span></span> The files it names</h2>
65-
<ul class="skill-files" role="list">
66-
{%- for path in skill.named %}
67-
<li><a href="{{ base }}{{ path }}">{{ base }}{{ path }}</a>
68-
{%- if path == "references/authoring.md" %}: the brief, read once
69-
{%- elif path == "LICENSE" %}: the skill's licence, MIT, which goes with it{% endif %}</li>
70-
{%- endfor %}
71-
</ul>
72-
</section>
73-
74-
<section class="step" aria-labelledby="types-heading">
75-
<h2 id="types-heading"><span class="step-marker"><span class="step-number">3</span></span> A content type's file</h2>
48+
{#- The sections are drawn as the build page's timeline (site.css). The lists are drawn without
49+
bullets, and Safari then reads one as a list only if it is told. -#}
50+
<section class="step" aria-labelledby="install-heading">
51+
<h2 id="install-heading"><span class="step-marker"><span class="step-number">1</span></span> Install the skill</h2>
7652
<p>
77-
One per content type: its notes, an example and its fields. Read the file of the type the
78-
source is written in, and those of the parts it holds, such as H5P.AdvancedText or H5P.Image.
53+
In an agent with a terminal:
54+
<code>npx skills add missing-elements/h5p-offline-player --skill h5p-author</code>. In a chat
55+
app, from a zip:
7956
</p>
8057
<ul class="skill-files" role="list">
81-
{%- for path in skill.types %}
82-
<li><a href="{{ base }}{{ path }}">{{ base }}{{ path }}</a></li>
83-
{%- endfor %}
58+
<li><a href="{{ base }}h5p-author.zip">{{ base }}h5p-author.zip</a>: for Claude and Grok</li>
59+
<li><a href="{{ base }}h5p-author-chatgpt.zip">{{ base }}h5p-author-chatgpt.zip</a>: for ChatGPT's Plugins</li>
8460
</ul>
8561
</section>
8662

8763
<section class="step" aria-labelledby="bundles-heading">
88-
<h2 id="bundles-heading"><span class="step-marker"><span class="step-number">4</span></span> To build where npm cannot be reached</h2>
64+
<h2 id="bundles-heading"><span class="step-marker"><span class="step-number">2</span></span> To build where npm cannot be reached</h2>
8965
<p>
9066
The build tool, which runs with Node and nothing installed, and a bundle per content type:
9167
the libraries a build of that type reads. Fetch the tool and the bundle of the source's own
92-
type, as step 3 of <code>SKILL.md</code> says.
68+
type, as the skill says.
9369
</p>
9470
<ul class="skill-files" role="list">
9571
{%- for file in skill.bundles %}

‎src/sitemap.njk‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ permalink: /sitemap.xml
33
eleventyExcludeFromCollections: true
44
---
55
<?xml version="1.0" encoding="utf-8"?>
6-
{#- The site's pages, for search engines: what is written as HTML. A data file such as
7-
/h5p/skill/index.json is a template too, and the skill's files are copied, not written. -#}
6+
{#- The site's pages, for search engines: what is written as HTML, since a template may write
7+
another kind of file. -#}
88
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
99
{%- for entry in collections.all %}
1010
{%- if entry.outputPath and entry.outputPath.endsWith(".html") %}

0 commit comments

Comments
 (0)