Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The site of the [missing-elements](https://github.com/missing-elements) web comp
| `/pdfjs-viewer/` | The docs of `<pdfjs-viewer-element>`, 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

Expand Down Expand Up @@ -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 |

Expand Down
7 changes: 0 additions & 7 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <head> by
// base.njk, and holding no double quote) allows its inline scripts by hash, as they are written:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 5 additions & 16 deletions src/_data/skill.js
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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],
};
5 changes: 0 additions & 5 deletions src/h5p/skill/index.json.11ty.js

This file was deleted.

82 changes: 29 additions & 53 deletions src/h5p/skill/index.njk
Original file line number Diff line number Diff line change
@@ -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 <head>, 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 <Type>, 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" %}
Expand All @@ -22,74 +23,49 @@ csp: "default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self'; o
<header class="docs-header">
<h1>The h5p-author skill</h1>
<p class="lead">
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.
</p>
{#- 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. -#}
<blockquote class="for-person">
<p>
<strong>For a person reading this:</strong> 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
<strong>For a person reading this:</strong> the page is written for an AI chat. To install
the skill, follow
<a href="{{ site.url }}/h5p/create-with-ai/#install">{{ site.url }}/h5p/create-with-ai/#install</a>.
The page that makes an activity is
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a>.
</p>
</blockquote>
<p>
Read <code>SKILL.md</code> first and follow its steps. A file it names, such as
<code>references/authoring.md</code> or a content type's <code>references/types/&lt;Type&gt;.md</code>,
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
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a> runs.
</p>
<p>
Where skills can be installed, install it instead:
<code>npx skills add missing-elements/h5p-offline-player --skill h5p-author</code>, or in
Claude, ChatGPT or Grok from the zips at
<a href="{{ site.url }}/h5p/create-with-ai/#install">{{ site.url }}/h5p/create-with-ai/#install</a>.
These are the files of h5p-author {{ skill.version }}, the release the build page at
<a href="{{ site.url }}/h5p/build/">{{ site.url }}/h5p/build/</a> runs. The skill's text is in
the zips, and on
<a href="https://github.com/missing-elements/h5p-offline-player/tree/main/skills/h5p-author">GitHub</a>.
</p>
</header>

{#- 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. -#}
<section class="step" aria-labelledby="first-heading">
<h2 id="first-heading"><span class="step-marker"><span class="step-number">1</span></span> Read first</h2>
<ul class="skill-files" role="list">
<li><a href="{{ base }}SKILL.md">{{ base }}SKILL.md</a>: the skill's steps</li>
</ul>
</section>

<section class="step" aria-labelledby="named-heading">
<h2 id="named-heading"><span class="step-marker"><span class="step-number">2</span></span> The files it names</h2>
<ul class="skill-files" role="list">
{%- for path in skill.named %}
<li><a href="{{ base }}{{ path }}">{{ base }}{{ path }}</a>
{%- if path == "references/authoring.md" %}: the brief, read once
{%- elif path == "LICENSE" %}: the skill's licence, MIT, which goes with it{% endif %}</li>
{%- endfor %}
</ul>
</section>

<section class="step" aria-labelledby="types-heading">
<h2 id="types-heading"><span class="step-marker"><span class="step-number">3</span></span> A content type's file</h2>
{#- 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. -#}
<section class="step" aria-labelledby="install-heading">
<h2 id="install-heading"><span class="step-marker"><span class="step-number">1</span></span> Install the skill</h2>
<p>
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:
<code>npx skills add missing-elements/h5p-offline-player --skill h5p-author</code>. In a chat
app, from a zip:
</p>
<ul class="skill-files" role="list">
{%- for path in skill.types %}
<li><a href="{{ base }}{{ path }}">{{ base }}{{ path }}</a></li>
{%- endfor %}
<li><a href="{{ base }}h5p-author.zip">{{ base }}h5p-author.zip</a>: for Claude and Grok</li>
<li><a href="{{ base }}h5p-author-chatgpt.zip">{{ base }}h5p-author-chatgpt.zip</a>: for ChatGPT's Plugins</li>
</ul>
</section>

<section class="step" aria-labelledby="bundles-heading">
<h2 id="bundles-heading"><span class="step-marker"><span class="step-number">4</span></span> To build where npm cannot be reached</h2>
<h2 id="bundles-heading"><span class="step-marker"><span class="step-number">2</span></span> To build where npm cannot be reached</h2>
<p>
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 <code>SKILL.md</code> says.
type, as the skill says.
</p>
<ul class="skill-files" role="list">
{%- for file in skill.bundles %}
Expand Down
4 changes: 2 additions & 2 deletions src/sitemap.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
{#- 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. -#}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for entry in collections.all %}
{%- if entry.outputPath and entry.outputPath.endsWith(".html") %}
Expand Down
Loading
Loading