diff --git a/www/deno.json b/www/deno.json index 0c21fdc..61e22b5 100644 --- a/www/deno.json +++ b/www/deno.json @@ -1,11 +1,16 @@ { "tasks": { "start": "deno run -A --watch=static/,routes/ dev.ts", - "test": "deno test -A --unstable test" + "test": "deno test -A --unstable --no-check test" }, "importMap": "./import_map.json", "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" + }, + "lint": { + "rules": { + "exclude": ["prefer-const", "require-yield"] + } } } diff --git a/www/deno.lock b/www/deno.lock index 0cc993e..b1ea85b 100644 --- a/www/deno.lock +++ b/www/deno.lock @@ -2,9 +2,15 @@ "version": "3", "packages": { "specifiers": { + "jsr:@libs/xml": "jsr:@libs/xml@5.4.13", "npm:preact-render-to-string@5.2.4": "npm:preact-render-to-string@5.2.4_preact@10.18.2", "npm:preact@10.18.2": "npm:preact@10.18.2" }, + "jsr": { + "@libs/xml@5.4.13": { + "integrity": "995320d1ce4a29ced82233e5e46d47a880e338197bbd257a686bf9afcc3ac0e4" + } + }, "npm": { "preact-render-to-string@5.2.4_preact@10.18.2": { "integrity": "sha512-iIPHb3BXUQ3Za6KNhkjN/waq11Oh+QWWtAgN3id3LrL+cszH3DYh8TxJPNQ6Aogsbu4JsqdJLBZltwPFpG6N6w==", @@ -39,6 +45,8 @@ "https://deno.land/std@0.140.0/path/posix.ts": "293cdaec3ecccec0a9cc2b534302dfe308adb6f10861fa183275d6695faace44", "https://deno.land/std@0.140.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9", "https://deno.land/std@0.140.0/path/win32.ts": "31811536855e19ba37a999cd8d1b62078235548d67902ece4aa6b814596dd757", + "https://deno.land/std@0.145.0/testing/_test_suite.ts": "ad453767aeb8c300878a6b7920e20370f4ce92a7b6c8e8a5d1ac2b7c14a09acb", + "https://deno.land/std@0.145.0/testing/bdd.ts": "182bb823e09bd75b76063ecf50722870101b7cfadf97a09fa29127279dc21128", "https://deno.land/std@0.150.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74", "https://deno.land/std@0.150.0/_util/os.ts": "3b4c6e27febd119d36a416d7a97bd3b0251b77c88942c8f16ee5953ea13e2e49", "https://deno.land/std@0.150.0/async/abortable.ts": "87aa7230be8360c24ad437212311c9e8d4328854baec27b4c7abb26e85515c06", @@ -126,6 +134,9 @@ "https://deno.land/std@0.205.0/path/windows/_util.ts": "f32b9444554c8863b9b4814025c700492a2b57ff2369d015360970a1b1099d54", "https://deno.land/std@0.205.0/path/windows/join.ts": "e6600bf88edeeef4e2276e155b8de1d5dec0435fd526ba2dc4d37986b2882f16", "https://deno.land/std@0.205.0/path/windows/normalize.ts": "9deebbf40c81ef540b7b945d4ccd7a6a2c5a5992f791e6d3377043031e164e69", + "https://deno.land/std@0.97.0/fmt/colors.ts": "db22b314a2ae9430ae7460ce005e0a7130e23ae1c999157e3bb77cf55800f7e4", + "https://deno.land/std@0.97.0/testing/_diff.ts": "961eaf6d9f5b0a8556c9d835bbc6fa74f5addd7d3b02728ba7936ff93364f7a3", + "https://deno.land/std@0.97.0/testing/asserts.ts": "341292d12eebc44be4c3c2ca101ba8b6b5859cef2fa69d50c217f9d0bfbcfd1f", "https://deno.land/x/code_block_writer@11.0.3/mod.ts": "2c3448060e47c9d08604c8f40dee34343f553f33edcdfebbf648442be33205e5", "https://deno.land/x/code_block_writer@11.0.3/utils/string_utils.ts": "60cb4ec8bd335bf241ef785ccec51e809d576ff8e8d29da43d2273b69ce2a6ff", "https://deno.land/x/denoflate@1.2.1/mod.ts": "f5628e44b80b3d80ed525afa2ba0f12408e3849db817d47a883b801f9ce69dd6", @@ -143,6 +154,10 @@ "https://deno.land/x/esbuild_deno_loader@0.5.2/src/native_loader.ts": "343854a566cf510cf25144f7c09fc0c1097780a31830305142a075d12bb697ba", "https://deno.land/x/esbuild_deno_loader@0.5.2/src/portable_loader.ts": "35b6c526eed8c2c781a3256b23c30aa7cce69c0ef1d583c15528663287ba18a3", "https://deno.land/x/esbuild_deno_loader@0.5.2/src/shared.ts": "b64749cd8c0f6252a11498bd8758ef1220003e46b2c9b68e16da63fd7e92b13a", + "https://deno.land/x/expect@v0.2.9/expect.ts": "128c60f94ff3f977e2a649463238e403f9bdb8e6ab77e65214c0236bd61b0111", + "https://deno.land/x/expect@v0.2.9/matchers.ts": "ba7360b73c5031a22449fa98eb4d5dbe7f256a88dd4c22ccae96dc6c01f0b19c", + "https://deno.land/x/expect@v0.2.9/mock.ts": "562d4b1d735d15b0b8e935f342679096b64fe452f86e96714fe8616c0c884914", + "https://deno.land/x/expect@v0.2.9/mod.ts": "0304d2430e1e96ba669a8495e24ba606dcc3d152e1f81aaa8da898cea24e36c2", "https://deno.land/x/fresh@1.1.2/dev.ts": "a66c7d64be35bcd6a8e12eec9c27ae335044c70363a241f2e36ee776db468622", "https://deno.land/x/fresh@1.1.2/plugins/twind.ts": "c0570d6010e29ba24ee5f43b9d3f1fe735f7fac76d9a3e680c9896373d669876", "https://deno.land/x/fresh@1.1.2/plugins/twind/shared.ts": "023e0ffcd66668753b5049edab0de46e6d66194fb6026c679034b9bbf04ad6f3", @@ -175,43 +190,99 @@ "https://deno.land/x/ts_morph@16.0.0/common/typescript.js": "5c59651248a4c41b25fa7beee8e0d0d0fab5f439fa72d478e65abd8241aa533c", "https://deno.land/x/ts_morph@16.0.0/mod.ts": "adba9b82f24865d15d2c78ef6074b9a7457011719056c9928c800f130a617c93", "https://deno.land/x/ts_morph@16.0.0/ts_morph.js": "9fc0f3d6a3997c2df023fabc4e529d2117d214ffd4fd04247ca2f56c4e9cd470", - "https://esm.sh/he@1.2.0": "0540fb0db449a4eb5bd10ef0ab04efd701f5217082bad13ee44ef89f99e97be9", - "https://esm.sh/marked@4.0.12": "038061a4e67bc04e189e2ae6dcff3fe71b945e8522f77a67abe63a6333b16834", - "https://esm.sh/prismjs@1.27.0": "77136c39612a156c684f2953246ed1b1a4a1cca259c1110c43e95db99bee4249", - "https://esm.sh/prismjs@1.27.0/components/prism-diff.js?no-check": "0c58cb95503577a26e90d9d6bf53767e9f0f9c3a085d8455422415dd0e50addf", - "https://esm.sh/prismjs@1.27.0/components/prism-graphql?no-check": "cde61e382f861ca73f5c3a8676ab231b83f613cf29c424e073d1cf9a653221b4", - "https://esm.sh/prismjs@1.27.0/components/prism-jsx.js?no-check": "16daaa59a0c67c171b7f0a2ca1b8d50b808c702553faccf1067c517d0aa236eb", - "https://esm.sh/prismjs@1.27.0/components/prism-tsx.js?no-check": "3a352cfaec495cb753638fa5aba1a903065103cf173e38c22d5bc31098c27194", - "https://esm.sh/prismjs@1.27.0/components/prism-typescript.js?no-check": "82e6652a9392d24f6dd0b2134a815c0166890cb1f1e467334e8f639683dda8b6", - "https://esm.sh/sanitize-html@2.7.0": "a7ae1cb0da7aa1f852fe0cbcbee84368cd48b2eb62a42c9998264705e1b69eec", - "https://esm.sh/twind@0.16.17": "430d4f34a95f305ac455d0e4cb8a9463054d13a51ecab66f128078a65246da25", - "https://esm.sh/twind@0.16.17/sheets": "943932e8045ecbd1ec50d95d50b705be7b97d80ac3ac18b2cdeb1afce55fafed", - "https://esm.sh/v133/deepmerge@4.3.1/denonext/deepmerge.mjs": "08481570f6011601fe4b827bffb00cdea632e55c923c44485d8719e8ab77b7c9", - "https://esm.sh/v133/dom-serializer@1.4.1/denonext/dom-serializer.mjs": "6583e2b8ad7c2e9535347ff2db2e23797920ea4215076861ce7229b12abb9cd5", - "https://esm.sh/v133/domelementtype@2.3.0/denonext/domelementtype.mjs": "371936c356d5ac797f2ce3a66b98dfc73e6fff0e095b2858b85668e6ad7d10e0", - "https://esm.sh/v133/domhandler@4.3.1/denonext/domhandler.mjs": "002521dc3766ec352144054e19bda40e4a710cba7d48689cfaea2bf551f532c9", - "https://esm.sh/v133/domutils@2.8.0/denonext/domutils.mjs": "dd4786011fa1f541fe9000257d0e44067ec8439380d090490de0f8cc1644ce51", - "https://esm.sh/v133/entities@2.2.0/denonext/entities.mjs": "af15975e7c8b5f17be658d1db80f9de7c076cb9cd53c4dcfc9dd60d460266d62", - "https://esm.sh/v133/entities@2.2.0/denonext/lib/decode_codepoint.js": "68b6cbd2b5c122b862e414cd9c3a01af2bff35d3d7b1dd2089f4ffcef5a2f5c2", - "https://esm.sh/v133/escape-string-regexp@4.0.0/denonext/escape-string-regexp.mjs": "4bebd5b21a97ea88f1b93f2851c077053d3cc323ac2b2eefc835ff3d7dab8ae9", - "https://esm.sh/v133/he@1.2.0/denonext/he.mjs": "1ffb3a2e1892578e01267fda4b32f30dd0b4b3be7393fe239b0ea30cf1d654c7", - "https://esm.sh/v133/htmlparser2@6.1.0/denonext/htmlparser2.mjs": "42789d53510c47a2335ee104d6109fbcf50ec3934c324ce7ac3e0d799f0123b8", - "https://esm.sh/v133/is-plain-object@5.0.0/denonext/is-plain-object.mjs": "6d9568ddc8b90de99a46c63e14984810280b6b021dc4e478803b3c240811985f", - "https://esm.sh/v133/marked@4.0.12/denonext/marked.mjs": "1e14773e19d6847a98dc32817f4d755cb4da3d26c9acf32411179df8d7af71d4", - "https://esm.sh/v133/nanoid@3.3.6/denonext/non-secure.js": "9339526d48828770370eba72bf719a40b74de0e1197d8a582c15fbd9ab837d3d", - "https://esm.sh/v133/parse-srcset@1.0.2/denonext/parse-srcset.mjs": "79b825d12a392cca8b39a53f6189e4f6d8c81612bbed7e3bb7946195d5264737", - "https://esm.sh/v133/picocolors@1.0.0/denonext/picocolors.mjs": "5d53d745955947dce84f82222cfd00fd021239fcbe9336c6bbfe34ed2f40886c", - "https://esm.sh/v133/postcss@8.4.31/denonext/postcss.mjs": "beef26461b34dfc8e4d6b9d6290f7645c6423e727f2984d7a14db695566d536f", - "https://esm.sh/v133/prismjs@1.27.0/denonext/components/prism-diff.js": "f652153b1b3e6d0721f343085ba4ed515102f1e8ac8f9539312b4ac39597ba55", - "https://esm.sh/v133/prismjs@1.27.0/denonext/components/prism-graphql.js": "aa112bfb4c053519e54350969dad3d9532582cb4ab55e2e7dafd21a6ca9a8eb6", - "https://esm.sh/v133/prismjs@1.27.0/denonext/components/prism-jsx.js": "7fd7be4359fcd5c25cecdd70dd3a7b0e95f95709e53169b8abe92ad7da715a70", - "https://esm.sh/v133/prismjs@1.27.0/denonext/components/prism-tsx.js": "d17030f8b706e6bbea0503bc67ca0339377af0c8a86fa043be73220ec64fbf60", - "https://esm.sh/v133/prismjs@1.27.0/denonext/components/prism-typescript.js": "2864b0748ebd4a82e24df1db06054d5e01ee485309b70951aac485c68bd17d08", - "https://esm.sh/v133/prismjs@1.27.0/denonext/prismjs.mjs": "ae53f15f65a2aa92e917a5e7ca5292fb4891863287a7094c6d44db3d8de3ee6d", - "https://esm.sh/v133/sanitize-html@2.7.0/denonext/sanitize-html.mjs": "49ae6dae4a0f5f089d9a7e2f7836d84a6b94f6be0d9b4f008acdcfec40b010ae", - "https://esm.sh/v133/source-map-js@1.0.2/denonext/source-map-js.mjs": "81ed2d1f28bd08a762f6819d5b366285a1bacf4b5c3757d866c79e4950529bfd", - "https://esm.sh/v133/style-vendorizer@2.2.3/denonext/style-vendorizer.mjs": "121455e7b04b631ef6463ce63cdcd29febd74d88c37713c774ceca8a1561c83d", - "https://esm.sh/v133/twind@0.16.17/denonext/sheets.js": "2903e4706310977e97d39560c1ef0938097e746b8aa7b0c4503a96c5b6abd2e5", - "https://esm.sh/v133/twind@0.16.17/denonext/twind.mjs": "d1d711349030b7438dba14610216b71aa440589b859ac883c7587a4dce585bf5" + "https://esm.sh/he@1.2.0": "388a449d0b163506f1a5ed1b9fe178c29433c9a3af5b2465c92ec4adb0f35792", + "https://esm.sh/marked@4.0.12": "5f4dfd6a6032c62cf73bd706153859cfd798167d2a672e712132f83ccdd8b343", + "https://esm.sh/prismjs@1.27.0": "7475ce881ab6ac7c2550162a4a9498d38038d5b2139e4df9c7f796389889b1eb", + "https://esm.sh/prismjs@1.27.0/components/prism-diff.js?no-check": "1844108bf09764d284b12f27f9f7697b67bd5e953c9fbeef66d32d84b6b7afa8", + "https://esm.sh/prismjs@1.27.0/components/prism-graphql?no-check": "14c91ceb4416203d58527b1ea6d80c0a6190d6cdc78e93ea218eef5d86f33044", + "https://esm.sh/prismjs@1.27.0/components/prism-jsx.js?no-check": "aeea2427d7d36ac1c2ea319401321ab224a26a86fc8c62d0563abbfd0f6494c7", + "https://esm.sh/prismjs@1.27.0/components/prism-tsx.js?no-check": "6d1810eca7d3b259a69cc6e12f0b97b6c899d9e0ad20146435e2ab8427123ce5", + "https://esm.sh/prismjs@1.27.0/components/prism-typescript.js?no-check": "5c24a3eed8664ce1aec673dfe9b052a6aaff5324201dbb8f0602b21a73add1f0", + "https://esm.sh/sanitize-html@2.7.0": "a14bec3fe4464b7bd7b3005d3abb78f8df6dbda21f91aafa6d7fbb0a36ff0c62", + "https://esm.sh/twind@0.16.17": "e9d05cb1e7a4ccb5b44c4409415bc02c26822a548c7ac8c2f227c11fcb124c89", + "https://esm.sh/twind@0.16.17/sheets": "31cc03d2acccf29b80d22712026be08667f61a853ba03bb32842ffb1a0e61c12", + "https://esm.sh/v135/deepmerge@4.3.1/denonext/deepmerge.mjs": "08481570f6011601fe4b827bffb00cdea632e55c923c44485d8719e8ab77b7c9", + "https://esm.sh/v135/dom-serializer@1.4.1/denonext/dom-serializer.mjs": "fd86f1d561e6a51a4f34448d5c4a9f2ab4eaa76047df96ee452a80a957c3d722", + "https://esm.sh/v135/domelementtype@2.3.0/denonext/domelementtype.mjs": "371936c356d5ac797f2ce3a66b98dfc73e6fff0e095b2858b85668e6ad7d10e0", + "https://esm.sh/v135/domhandler@4.3.1/denonext/domhandler.mjs": "463323f0b16b4174b4939241d737ad81d6fac54318a92a7bc96097ff1033804f", + "https://esm.sh/v135/domutils@2.8.0/denonext/domutils.mjs": "5470a0a019c52be8cda5c2d5e948bfc802134c9f81ee02a9958bbdd16cf3d11c", + "https://esm.sh/v135/entities@2.2.0/denonext/entities.mjs": "af15975e7c8b5f17be658d1db80f9de7c076cb9cd53c4dcfc9dd60d460266d62", + "https://esm.sh/v135/entities@2.2.0/denonext/lib/decode_codepoint.js": "68b6cbd2b5c122b862e414cd9c3a01af2bff35d3d7b1dd2089f4ffcef5a2f5c2", + "https://esm.sh/v135/escape-string-regexp@4.0.0/denonext/escape-string-regexp.mjs": "4bebd5b21a97ea88f1b93f2851c077053d3cc323ac2b2eefc835ff3d7dab8ae9", + "https://esm.sh/v135/he@1.2.0/denonext/he.mjs": "1ffb3a2e1892578e01267fda4b32f30dd0b4b3be7393fe239b0ea30cf1d654c7", + "https://esm.sh/v135/htmlparser2@6.1.0/denonext/htmlparser2.mjs": "3068af4d89ba653778e3c1248938db62b773357f6905a1b324084f5683cba978", + "https://esm.sh/v135/is-plain-object@5.0.0/denonext/is-plain-object.mjs": "6d9568ddc8b90de99a46c63e14984810280b6b021dc4e478803b3c240811985f", + "https://esm.sh/v135/marked@4.0.12/denonext/marked.mjs": "1e14773e19d6847a98dc32817f4d755cb4da3d26c9acf32411179df8d7af71d4", + "https://esm.sh/v135/nanoid@3.3.7/denonext/non-secure.js": "04f910c9045422af11c2760899978492d745d6b13e5d9f08040c13b658c27ee0", + "https://esm.sh/v135/parse-srcset@1.0.2/denonext/parse-srcset.mjs": "79b825d12a392cca8b39a53f6189e4f6d8c81612bbed7e3bb7946195d5264737", + "https://esm.sh/v135/picocolors@1.0.0/denonext/picocolors.mjs": "5d53d745955947dce84f82222cfd00fd021239fcbe9336c6bbfe34ed2f40886c", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/at-rule.js": "4cd3a53a67b972be9712e9af2492b2eadd32cbbeda6310a909e34d984bcda048", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/comment.js": "6224f5617fbcfb90ee0a14a07951258c2cacb8b918bd9210c9950e617f0daaa8", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/container.js": "128ef5a47586593b71b52c4499920b384a1fa73df9bbd14c8ff1946fc440a783", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/css-syntax-error.js": "81e3ca71ff833022a56aa7b4de2c5995999f33465a209390e6b28b7611582d41", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/declaration.js": "d8ed2e3f54f9970cdc66c139481cd52961708dd7202cfdb409bf5f1c5b4ffb83", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/fromJSON.js": "f08d5cd84c4840a726cbc2fc149253864dafe69ff2991fa0c6fa3490c5c8fd70", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/input.js": "5776098707b39daca45565699c1d1ecd700c415ca863c7ebef7d402619c7f9c0", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/lazy-result.js": "5e2c5cbe211148ecd272f5900fc4189317c74acf3570ff12b307a31716069536", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/list.js": "9ee1a8ca4cb42b87372db1fc6549fff29916564f8c07bf52870a84d2b91c6553", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/map-generator.js": "1d25d7e1f7c98e583a7525966ff00065aa0f2cfc78e760fccdb1dbf632746004", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/no-work-result.js": "a7e85149a2a58cdb8d24928f37da2c1fe7a7812466cf03b1ef3ad34ee66c60e7", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/node.js": "fb129d1023b2c428f9fe10626ce345508eaeca84def469b7ff025a14932fc14b", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/parse.js": "6f2f0301c1b6171f930973e93eae429a7c7355e9a73b608548e38a0a58669167", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/parser.js": "09074eefec15c6849794c51f0bea2af7f37f8c64dd2a210831f0d9047d73129c", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/postcss.js": "e3455363a90f50b2fb40ef356772e408a924692d363dca03ac676fd7dd786391", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/previous-map.js": "22332c5d21d8a3c56df08f6ed46ea0c2034ec9d2a3ca8e85d28c2b7ec3875e05", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/processor.js": "583f9dee08e160a160f14f60c98733ba4c187de9a3192fe2f0a04ffe35b09e95", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/result.js": "c40d7a814c0c95f250bcc5eb1f94110c016e7ff7dae1e25ffdc298520ba1a0c5", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/root.js": "c211a1310bfcf0a7e202a68d0bf79125ac472a5a4f3b6b1d9fb17805c1323550", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/rule.js": "4316a023cfaa889a2ec21e5a6129ce0e3639936f578c44909d3dc537aaf11be4", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/stringifier.js": "ee4c8dff2c1e67ea351bc003563f15cbfaaa1a5d079eda31dfb8b7d23fd7ca19", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/stringify.js": "c99df0b7406b7a1c63909c855959255d5ecef31967a0eb09ae08cf84737b6d61", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/symbols.js": "21d641931343fff9437a1bd720a7df9e60d7f599b2ba269c98a1e741071f495c", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/terminal-highlight.js": "5f215fde89517b9e37963ed10c31962a0f3331bc6d7da6ec61d1305d86aee9f2", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/tokenize.js": "c73b6614aa8e3afd00130d76bb989d9c3211f225c9e9e6a8c326b0952d05d4b6", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/warn-once.js": "3f6117216f9e1c8935cb05ee84459bf10debfaaf5ecbe517c43d3c1c31aa0b2f", + "https://esm.sh/v135/postcss@8.4.31/denonext/lib/warning.js": "af11340817cce38f4b02f93cadb4c77b0142c69565f07ee86e13ba8948ebeb16", + "https://esm.sh/v135/postcss@8.4.31/denonext/postcss.mjs": "17cb1bfa8d463c1e35ed187969d937c4a2c880508dcaf00f15db9277ffc4becd", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/at-rule.js": "7f7aad25773b6361b5f7a81309dd3d60555426b4fe859c29dfb68a9110de0b4d", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/comment.js": "94519769317b9856732782925d9c32f33c98633a3b31074a76034d4a16a360b5", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/container.js": "45883ae24d338835db06f324706ba0934663dd8bcc88d21aa923d05597bfd38e", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/css-syntax-error.js": "caef7286b91a148388b76a45cb0bf5293b005897a48cf62f4f56c30ce2eb0834", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/declaration.js": "44558eb6e72e0f000c036509b3ef3d44d70432cd4d01e09671c2c85ab1709cf4", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/fromJSON.js": "f05f54ed5babba9300d5121275e1107ae4b12276b86b13f3219ea80fa9986ea3", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/input.js": "14c0a956b92c072b593ef35001970bf762978b07f42e60f0aacdace541c1a82d", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/lazy-result.js": "f0534da57a829115bbee562df99b3ff9891bad4692fd094702246437db84af28", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/list.js": "ce4588bde029f95e2bcfb7675670af661551914e73c96c8bc7ce24fa9f978b65", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/map-generator.js": "3b9a40cb3bac5922ad4816a2cadf8ccbaab11cfc305fc0a3afbec4358526b480", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/no-work-result.js": "f2151514943518a5ac4c13d6853512f8cfa709e80c67f5e3bbc551ef0d8c72ca", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/node.js": "ba7355f16c1bc712dd71484012fde675c10c7a38c0ea6a1f03eca9ab8ccb3b07", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/parse.js": "db01a4fcb97fef4be982ea3f32edaed427613921a31801983eb4a23ef2b65233", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/parser.js": "a0a5ed855c27c92eeb2c2b5e727f4d1023cbe458376077172196de18692315e2", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/postcss.js": "f1b3eabedea51c3f10d5ada9d4dd63bff400216edda089eca6b9378be99326b2", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/previous-map.js": "181598770c54258b85eacfe180dcacbb19695a27dcde4456aeee058e4378d335", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/processor.js": "b02c06cc3d78c5b8eb85f3c81b9034d2ab9cb714d2c109d0dbca050f6a33eb42", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/result.js": "381de30db69bda66e0d766eb6b3eb7db85f624ff8ad3a4ed8e8dc86248ebd547", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/root.js": "a535bc0ddbae94e365ba09c702fff2e4a101cd2264aafd5f34e3c3595e83ae39", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/rule.js": "1cac88cf4576e276a19ac6cb72c27f9232f5c7f0b6870f9f9dae5a5181142b8c", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/stringifier.js": "df945581d9ae8d1dd1ba4ba354005781bc8faf3e3e8583d471c9cee04fa9171d", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/stringify.js": "04ecdc098b435f81815d4c9f311ab17c55086ba628a3381b6ab0f84976d3546d", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/symbols.js": "614126031ee73d7e80f807366d5f18ca5ff690ad5853e47af3eed579d9267eaf", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/terminal-highlight.js": "6ddd355bb57c0cb59f6d4a3b1cb37316eea8f5f10be71e582982ec2b5a7b02b1", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/tokenize.js": "d2d31a1e8e148a4693d2be7ed2eea788a14189b400fe9c77c2df6a72456ea3cf", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/warn-once.js": "6d2c941f8f55f4988d78dc2632d688eb5a1e87a680e0de54308df41101a4c5b8", + "https://esm.sh/v135/postcss@8.4.38/denonext/lib/warning.js": "481625e9ac2a4ccc8a6722af2f4eb6490be2df1fcc83e572190cffd4be990e04", + "https://esm.sh/v135/postcss@8.4.38/denonext/postcss.mjs": "a31d638a44d7653e06a9d82b0aeadf14b3bbd7907a3f4d8519f8006a77f73f31", + "https://esm.sh/v135/prismjs@1.27.0/denonext/components/prism-diff.js": "f652153b1b3e6d0721f343085ba4ed515102f1e8ac8f9539312b4ac39597ba55", + "https://esm.sh/v135/prismjs@1.27.0/denonext/components/prism-graphql.js": "aa112bfb4c053519e54350969dad3d9532582cb4ab55e2e7dafd21a6ca9a8eb6", + "https://esm.sh/v135/prismjs@1.27.0/denonext/components/prism-jsx.js": "7fd7be4359fcd5c25cecdd70dd3a7b0e95f95709e53169b8abe92ad7da715a70", + "https://esm.sh/v135/prismjs@1.27.0/denonext/components/prism-tsx.js": "d17030f8b706e6bbea0503bc67ca0339377af0c8a86fa043be73220ec64fbf60", + "https://esm.sh/v135/prismjs@1.27.0/denonext/components/prism-typescript.js": "2864b0748ebd4a82e24df1db06054d5e01ee485309b70951aac485c68bd17d08", + "https://esm.sh/v135/prismjs@1.27.0/denonext/prismjs.mjs": "ae53f15f65a2aa92e917a5e7ca5292fb4891863287a7094c6d44db3d8de3ee6d", + "https://esm.sh/v135/sanitize-html@2.7.0/denonext/sanitize-html.mjs": "d3ef3b0140960800501807202835342d79ca82f30ca131dd2677f22ff1e2601c", + "https://esm.sh/v135/source-map-js@1.0.2/denonext/source-map-js.mjs": "81ed2d1f28bd08a762f6819d5b366285a1bacf4b5c3757d866c79e4950529bfd", + "https://esm.sh/v135/source-map-js@1.2.0/denonext/source-map-js.mjs": "09ac7844f8befaecf87151a2cba96cb5b658563fc2b4d2f099f0558dfb9c193d", + "https://esm.sh/v135/style-vendorizer@2.2.3/denonext/style-vendorizer.mjs": "121455e7b04b631ef6463ce63cdcd29febd74d88c37713c774ceca8a1561c83d", + "https://esm.sh/v135/twind@0.16.17/denonext/sheets.js": "2903e4706310977e97d39560c1ef0938097e746b8aa7b0c4503a96c5b6abd2e5", + "https://esm.sh/v135/twind@0.16.17/denonext/twind.mjs": "6aa3dcacb083937bb654cf6a50e74270fa12ad8b9205a097324c467f55752188" } } diff --git a/www/fresh.gen.ts b/www/fresh.gen.ts index 1470d03..2d2127d 100644 --- a/www/fresh.gen.ts +++ b/www/fresh.gen.ts @@ -9,6 +9,7 @@ import * as $2 from "./routes/_500.tsx"; import * as $3 from "./routes/docs/[...slug].tsx"; import * as $4 from "./routes/gfm.css.ts"; import * as $5 from "./routes/index.tsx"; +import * as $6 from "./routes/sitemap.xml.ts"; import * as $$0 from "./islands/CopyArea.tsx"; const manifest = { @@ -19,6 +20,7 @@ const manifest = { "./routes/docs/[...slug].tsx": $3, "./routes/gfm.css.ts": $4, "./routes/index.tsx": $5, + "./routes/sitemap.xml.ts": $6, }, islands: { "./islands/CopyArea.tsx": $$0, diff --git a/www/routes/sitemap.xml.ts b/www/routes/sitemap.xml.ts new file mode 100644 index 0000000..e050247 --- /dev/null +++ b/www/routes/sitemap.xml.ts @@ -0,0 +1,40 @@ +import { Handlers } from "$fresh/server.ts"; +import { stringify } from "jsr:@libs/xml"; + +import docs from "../docs/toc.json" with { type: "json" }; + +export const handler: Handlers = { + GET(request) { + let base = new URL( + request.headers.get("x-base-url") ?? new URL(new URL(request.url).origin), + ); + let paths = Object.entries(docs).flatMap(([topic, collection]) => { + if ("pages" in collection) { + return collection.pages.map(([id]) => `${topic}/${id}`); + } else { + return topic; + } + }); + + let index = { loc: String(base) }; + + let urls = paths.map((path) => ({ + loc: String(new URL(path, base)), + })); + + let xml = stringify({ + "@version": "1.0", + "@encoding": "UTF-8", + urlset: { + "@xmlns": "http://www.sitemaps.org/schemas/sitemap/0.9", + url: [index, ...urls], + }, + }); + + return new Response(xml, { + headers: { + "Content-Type": "application/xml", + }, + }); + }, +};