generate the summary and the document objects from inside the webpage() function

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2026-06-17 23:25:39 +02:00
parent 500a6ad181
commit f7db139b0d
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
10 changed files with 234 additions and 144 deletions

View file

@ -1,23 +1,17 @@
#import "@local/template-web:0.0.1": *
#import "/lib.typ": webpage
#let summ = summary(
base-url: "http://test.example.com",
#show: webpage.with(
path: "/pycript.html",
title: "TeTyTe",
page-label: <pyscript-label>,
description: "Demonstrate how to use pyscript to run python in the browser",
tags: ("test", "html/css", "typst", "python"),
date: datetime(year: 1942, month: 4, day: 1),
page-label: <pyscript-page>,
preview-image: image(
"/assets/platypus.png",
alt: "A drawing of a blue-ish round-ish platypus with big eyes, holding a laptop. This platypus is quite cute, but I might be biased.",
),
author: "Me!",
tags: ("test", "html/css", "typst", "pyscript"),
description: "Demonstrate how to use pyscript to run python in the browser",
date: datetime(year: 1942, month: 4, day: 1),
)
#show: webpage.with(
..summ.template-args,
header: [
= Showcase Pyscript
Show how to run Python in the browser
@ -109,4 +103,3 @@ pprint([(k, v["title"]) for k, v in data.items()][:10])
from isn_s_cube import wasm
await wasm()
```