add options to configure pyscript interpreter
This commit is contained in:
parent
25cb9c6403
commit
bc75cb1c1a
2 changed files with 25 additions and 6 deletions
|
|
@ -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, pyscript-show
|
||||
#import "./pyscript.typ": state-use-pyscript, state-pyscript-headers, state-pyscript-version, state-pyscript-interpreters, state-pyscript-default-interpreter, pyscript-show
|
||||
#import "./rss.typ": rss
|
||||
#import "./icons.typ"
|
||||
|
||||
|
|
@ -34,8 +34,12 @@
|
|||
me-links: (),
|
||||
/// Dictionnary of available tags to add in header for each versions of pyscript
|
||||
pyscript-headers: (:),
|
||||
/// Dictionnary of available python version to add in header for each pyscript interpreter
|
||||
pyscript-interpreters: (:),
|
||||
/// Pyscript version to use
|
||||
pyscript-version: none,
|
||||
/// Default python version to use for selecting the pyscript interpreter
|
||||
pyscript-default-interpreter: none
|
||||
//-- Body --
|
||||
/// Array of element to add on the top left of the page
|
||||
nav-elements: none,
|
||||
|
|
@ -54,7 +58,9 @@
|
|||
assert(type(url) == str, message: "A page must have an url")
|
||||
context {
|
||||
state-pyscript-headers.update(x => pyscript-headers)
|
||||
state-pyscript-interpreters.update(x => pyscript-interpreters)
|
||||
state-pyscript-version.update(x => pyscript-version)
|
||||
state-pyscript-default-interpreter.update(x => pyscript-default-interpreter)
|
||||
}
|
||||
show: html-show
|
||||
show raw.where(block: true, lang: "python"): pyscript-show
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue