A Kite plugin: a video link pasted on a line of its own becomes a player.
https://cdn.example.com/2026/demo.mp4becomes a <video> with controls, and
https://www.bilibili.com/video/BV1xx411c7mD
https://youtu.be/dQw4w9WgXcQbecome the players those sites serve. Nothing else changes: a link inside a sentence stays a link, and a link inside a code block is left exactly as written.
| Address | Becomes |
|---|---|
…/demo.mp4, …/demo.webm, …/demo.ogg |
a <video> element |
bilibili.com/video/BV…, b23.tv/… |
Bilibili's player, loading="lazy" |
youtube.com/watch?v=…, youtu.be/… |
YouTube's player, on youtube-nocookie.com, loading="lazy" |
The same addresses pasted as a picture, , are taken
too: a picture of a video is a broken image otherwise.
Both forms are only taken when they stand alone in a paragraph.
The shortcode needs a template in the site or its theme; a site without one
stops the build at that line. This plugin rewrites the finished HTML instead,
so it works with any theme and needs no markdown.unsafeHTML.
The shortcode is still the better choice when the theme has
layouts/_shortcodes/video.html: it takes poster and caption, which a
pasted address has nowhere to carry. The two can live side by side.
make # plugin.wasm, built with GOOS=wasip1 GOARCH=wasm
make test # the transform, on the hostNeeds Go 1.27.4 or newer, the same floor as Kite itself: the module is built
with the patched toolchain, and //go:wasmexport needs 1.24 or newer.
In a site:
mkdir -p plugins && cp -r ../kite-plugin-video plugins/videothen in kite.yaml:
plugins:
enabled: [video]kite plugin verify plugins/video checks it the way a build does.
A plugin cannot upload a file or raise Kite's 32 MB upload limit. A video too large for the repository belongs on a CDN or an object storage bucket, with the address pasted into the post; that is what this plugin is for.