add support for pygame scripts

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-06-07 15:57:09 +02:00
parent fe4b003971
commit 3be22c5654
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
6 changed files with 180 additions and 89 deletions

View file

@ -2,7 +2,7 @@
#import "./html_body.typ": html-body
#import "./html_utils.typ": html-show
#import "./summary.typ": summary, card-list
#import "./pyscript.typ": state-use-pyscript, state-pyscript-headers, state-pyscript-version, state-pyscript-interpreters, state-pyscript-default-interpreter, pyscript-show
#import "./pyscript.typ": state-use-pyscript, state-pyscript-data-list, state-pyscript-version, state-pyscript-interpreters, state-pyscript-default-interpreter, pyscript-show, pyscript-data
#import "./rss.typ": rss
#import "./icons.typ"
@ -32,8 +32,9 @@
stylesheets: (),
/// List of related sites for metadata
me-links: (),
/// Dictionnary of available tags to add in header for each versions of pyscript
pyscript-headers: (:),
/// Dictionnary of available pyscript-data for each versions of pyscript
/// expected in the form of ("<version>": pyscript-data-list("<url>", { html.link(...) }), ...)
pyscript-data-list: (:),
/// Dictionnary of available python version to add in header for each pyscript interpreter
pyscript-interpreters: (:),
/// Pyscript version to use
@ -57,7 +58,7 @@
) = {
assert(type(url) == str, message: "A page must have an url")
context {
state-pyscript-headers.update(x => pyscript-headers)
state-pyscript-data-list.update(x => pyscript-data-list)
state-pyscript-interpreters.update(x => pyscript-interpreters)
state-pyscript-version.update(x => pyscript-version)
state-pyscript-default-interpreter.update(x => pyscript-default-interpreter)