diff --git a/flake.lock b/flake.lock
index f2ddda7..5e7cccf 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1769433173,
- "narHash": "sha256-Gf1dFYgD344WZ3q0LPlRoWaNdNQq8kSBDLEWulRQSEs=",
+ "lastModified": 1775888245,
+ "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "13b0f9e6ac78abbbb736c635d87845c4f4bee51b",
+ "rev": "13043924aaa7375ce482ebe2494338e058282925",
"type": "github"
},
"original": {
diff --git a/package.json b/package.json
index 863247f..6ceee76 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"@sveltejs/enhanced-img": "^0.10.4",
"@sveltejs/kit": "^2.57.1",
"@sveltejs/vite-plugin-svelte": "^6.2.4",
+ "mdsvex": "^0.12.7",
"prettier": "^3.8.2",
"prettier-plugin-svelte": "^3.5.1",
"sharp": "^0.34.5",
diff --git a/patches/@sveltejs__enhanced-img.patch b/patches/@sveltejs__enhanced-img.patch
new file mode 100644
index 0000000..ab74d6f
--- /dev/null
+++ b/patches/@sveltejs__enhanced-img.patch
@@ -0,0 +1,57 @@
+diff --git a/src/vite-plugin.js b/src/vite-plugin.js
+index c8ccb26b3f17cb69eb1e725bab1cde02c88c36cf..565ec235170b148017d191c62599c3968457e77e 100644
+--- a/src/vite-plugin.js
++++ b/src/vite-plugin.js
+@@ -114,7 +114,7 @@ export function image_plugin(imagetools_plugin) {
+ const image = await process_id(resolved_id, plugin_context, imagetools_plugin);
+ s.update(node.start, node.end, img_to_picture(content, node, image));
+ } else {
+- const metadata = await sharp(resolved_id).metadata();
++ const metadata = await sharp(resolved_id, { animated: true }).metadata();
+ // this must come after the await so that we don't hand off processing between getting
+ // the imports.size and incrementing the imports.size
+ const name = imports.get(original_url) || '__IMPORTED_ASSET_' + imports.size + '__';
+@@ -136,7 +136,7 @@ export function image_plugin(imagetools_plugin) {
+ */
+ const pending_ast_updates = [];
+
+- walk(/** @type {import('svelte/compiler').AST.TemplateNode} */ (ast), null, {
++ walk(/** @type {import('svelte/compiler').AST.TemplateNode} */(ast), null, {
+ RegularElement(node, { next }) {
+ if ('name' in node && node.name === 'enhanced:img') {
+ // Compare node tag match
+@@ -231,7 +231,7 @@ export function parse_object(str) {
+ function get_attr_value(node, attr) {
+ if (!('type' in node) || !('attributes' in node)) return;
+ const attribute = node.attributes.find(
+- /** @param {any} v */ (v) => v.type === 'Attribute' && v.name === attr
++ /** @param {any} v */(v) => v.type === 'Attribute' && v.name === attr
+ );
+
+ if (!attribute || !('value' in attribute) || typeof attribute.value === 'boolean') return;
+@@ -376,8 +376,8 @@ function dynamic_img_to_picture(content, node, src_var_name) {
+ {${src_var_name}} was not enhanced. Cannot determine dimensions.
+ {:else}
+
++ src: `{${src_var_name}}`
++ })} />
+ {/if}
+ {:else}
+
+@@ -385,10 +385,10 @@ function dynamic_img_to_picture(content, node, src_var_name) {
+
+ {/each}
+
++ src: `{${src_var_name}.img.src}`,
++ width: `{${src_var_name}.img.w}`,
++ height: `{${src_var_name}.img.h}`
++ })} />
+
+ {/if}`;
+ }
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 715bfa1..d38ee60 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4,6 +4,11 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
+patchedDependencies:
+ '@sveltejs/enhanced-img':
+ hash: 9a1c9b4c9cd4aefef304f2ebee4669210b8e93cf37300e82857392a6327dfbd8
+ path: patches/@sveltejs__enhanced-img.patch
+
importers:
.:
@@ -13,13 +18,16 @@ importers:
version: 3.0.10(@sveltejs/kit@2.57.1(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(svelte@5.55.3(@typescript-eslint/types@8.58.0))(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))
'@sveltejs/enhanced-img':
specifier: ^0.10.4
- version: 0.10.4(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(rollup@4.60.1)(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
+ version: 0.10.4(patch_hash=9a1c9b4c9cd4aefef304f2ebee4669210b8e93cf37300e82857392a6327dfbd8)(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(rollup@4.60.1)(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
'@sveltejs/kit':
specifier: ^2.57.1
version: 2.57.1(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(svelte@5.55.3(@typescript-eslint/types@8.58.0))(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
'@sveltejs/vite-plugin-svelte':
specifier: ^6.2.4
version: 6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
+ mdsvex:
+ specifier: ^0.12.7
+ version: 0.12.7(svelte@5.55.3(@typescript-eslint/types@8.58.0))
prettier:
specifier: ^3.8.2
version: 3.8.2
@@ -233,89 +241,105 @@ packages:
resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linux-arm@1.2.4':
resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linux-ppc64@1.2.4':
resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linux-riscv64@1.2.4':
resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linux-s390x@1.2.4':
resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linux-x64@1.2.4':
resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@img/sharp-libvips-linuxmusl-arm64@1.2.4':
resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@img/sharp-libvips-linuxmusl-x64@1.2.4':
resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@img/sharp-linux-arm64@0.34.5':
resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@img/sharp-linux-arm@0.34.5':
resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@img/sharp-linux-ppc64@0.34.5':
resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@img/sharp-linux-riscv64@0.34.5':
resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@img/sharp-linux-s390x@0.34.5':
resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@img/sharp-linux-x64@0.34.5':
resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@img/sharp-linuxmusl-arm64@0.34.5':
resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@img/sharp-linuxmusl-x64@0.34.5':
resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@img/sharp-wasm32@0.34.5':
resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==}
@@ -385,36 +409,42 @@ packages:
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@parcel/watcher-linux-arm-musl@2.5.6':
resolution: {integrity: sha512-Ve3gUCG57nuUUSyjBq/MAM0CzArtuIOxsBdQ+ftz6ho8n7s1i9E1Nmk/xmP323r2YL0SONs1EuwqBp2u1k5fxg==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
+ libc: [musl]
'@parcel/watcher-linux-arm64-glibc@2.5.6':
resolution: {integrity: sha512-f2g/DT3NhGPdBmMWYoxixqYr3v/UXcmLOYy16Bx0TM20Tchduwr4EaCbmxh1321TABqPGDpS8D/ggOTaljijOA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@parcel/watcher-linux-arm64-musl@2.5.6':
resolution: {integrity: sha512-qb6naMDGlbCwdhLj6hgoVKJl2odL34z2sqkC7Z6kzir8b5W65WYDpLB6R06KabvZdgoHI/zxke4b3zR0wAbDTA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@parcel/watcher-linux-x64-glibc@2.5.6':
resolution: {integrity: sha512-kbT5wvNQlx7NaGjzPFu8nVIW1rWqV780O7ZtkjuWaPUgpv2NMFpjYERVi0UYj1msZNyCzGlaCWEtzc+exjMGbQ==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@parcel/watcher-linux-x64-musl@2.5.6':
resolution: {integrity: sha512-1JRFeC+h7RdXwldHzTsmdtYR/Ku8SylLgTU/reMuqdVD7CtLwf0VR1FqeprZ0eHQkO0vqsbvFLXUmYm/uNKJBg==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@parcel/watcher-win32-arm64@2.5.6':
resolution: {integrity: sha512-3ukyebjc6eGlw9yRt678DxVF7rjXatWiHvTXqphZLvo7aC5NdEgFufVwjFfY51ijYEWpXbqF5jtrK275z52D4Q==}
@@ -484,66 +514,79 @@ packages:
resolution: {integrity: sha512-L+34Qqil+v5uC0zEubW7uByo78WOCIrBvci69E7sFASRl0X7b/MB6Cqd1lky/CtcSVTydWa2WZwFuWexjS5o6g==}
cpu: [arm]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm-musleabihf@4.60.1':
resolution: {integrity: sha512-n83O8rt4v34hgFzlkb1ycniJh7IR5RCIqt6mz1VRJD6pmhRi0CXdmfnLu9dIUS6buzh60IvACM842Ffb3xd6Gg==}
cpu: [arm]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-arm64-gnu@4.60.1':
resolution: {integrity: sha512-Nql7sTeAzhTAja3QXeAI48+/+GjBJ+QmAH13snn0AJSNL50JsDqotyudHyMbO2RbJkskbMbFJfIJKWA6R1LCJQ==}
cpu: [arm64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-arm64-musl@4.60.1':
resolution: {integrity: sha512-+pUymDhd0ys9GcKZPPWlFiZ67sTWV5UU6zOJat02M1+PiuSGDziyRuI/pPue3hoUwm2uGfxdL+trT6Z9rxnlMA==}
cpu: [arm64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-loong64-gnu@4.60.1':
resolution: {integrity: sha512-VSvgvQeIcsEvY4bKDHEDWcpW4Yw7BtlKG1GUT4FzBUlEKQK0rWHYBqQt6Fm2taXS+1bXvJT6kICu5ZwqKCnvlQ==}
cpu: [loong64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-loong64-musl@4.60.1':
resolution: {integrity: sha512-4LqhUomJqwe641gsPp6xLfhqWMbQV04KtPp7/dIp0nzPxAkNY1AbwL5W0MQpcalLYk07vaW9Kp1PBhdpZYYcEw==}
cpu: [loong64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-ppc64-gnu@4.60.1':
resolution: {integrity: sha512-tLQQ9aPvkBxOc/EUT6j3pyeMD6Hb8QF2BTBnCQWP/uu1lhc9AIrIjKnLYMEroIz/JvtGYgI9dF3AxHZNaEH0rw==}
cpu: [ppc64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-ppc64-musl@4.60.1':
resolution: {integrity: sha512-RMxFhJwc9fSXP6PqmAz4cbv3kAyvD1etJFjTx4ONqFP9DkTkXsAMU4v3Vyc5BgzC+anz7nS/9tp4obsKfqkDHg==}
cpu: [ppc64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-riscv64-gnu@4.60.1':
resolution: {integrity: sha512-QKgFl+Yc1eEk6MmOBfRHYF6lTxiiiV3/z/BRrbSiW2I7AFTXoBFvdMEyglohPj//2mZS4hDOqeB0H1ACh3sBbg==}
cpu: [riscv64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-riscv64-musl@4.60.1':
resolution: {integrity: sha512-RAjXjP/8c6ZtzatZcA1RaQr6O1TRhzC+adn8YZDnChliZHviqIjmvFwHcxi4JKPSDAt6Uhf/7vqcBzQJy0PDJg==}
cpu: [riscv64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-linux-s390x-gnu@4.60.1':
resolution: {integrity: sha512-wcuocpaOlaL1COBYiA89O6yfjlp3RwKDeTIA0hM7OpmhR1Bjo9j31G1uQVpDlTvwxGn2nQs65fBFL5UFd76FcQ==}
cpu: [s390x]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-gnu@4.60.1':
resolution: {integrity: sha512-77PpsFQUCOiZR9+LQEFg9GClyfkNXj1MP6wRnzYs0EeWbPcHs02AXu4xuUbM1zhwn3wqaizle3AEYg5aeoohhg==}
cpu: [x64]
os: [linux]
+ libc: [glibc]
'@rollup/rollup-linux-x64-musl@4.60.1':
resolution: {integrity: sha512-5cIATbk5vynAjqqmyBjlciMJl1+R/CwX9oLk/EyiFXDWd95KpHdrOJT//rnUl4cUcskrd0jCCw3wpZnhIHdD9w==}
cpu: [x64]
os: [linux]
+ libc: [musl]
'@rollup/rollup-openbsd-x64@4.60.1':
resolution: {integrity: sha512-cl0w09WsCi17mcmWqqglez9Gk8isgeWvoUZ3WiJFYSR3zjBQc2J5/ihSjpl+VLjPqjQ/1hJRcqBfLjssREQILw==}
@@ -632,12 +675,18 @@ packages:
'@types/estree@1.0.8':
resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
+ '@types/mdast@4.0.4':
+ resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==}
+
'@types/node@25.6.0':
resolution: {integrity: sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==}
'@types/trusted-types@2.0.7':
resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
+ '@types/unist@2.0.11':
+ resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==}
+
'@typescript-eslint/types@8.58.0':
resolution: {integrity: sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -739,6 +788,11 @@ packages:
magic-string@0.30.21:
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
+ mdsvex@0.12.7:
+ resolution: {integrity: sha512-gx4bReLCUvq+MPErHXYeyX+TEq1hsS2KfiZtEOMNTcbibSouFy8AHc5h04KbGCl+g5tLuo4/lbgRVYRnc7bJZw==}
+ peerDependencies:
+ svelte: ^3.56.0 || ^4.0.0 || ^5.0.0-next.120
+
mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
@@ -780,6 +834,13 @@ packages:
engines: {node: '>=14'}
hasBin: true
+ prism-svelte@0.4.7:
+ resolution: {integrity: sha512-yABh19CYbM24V7aS7TuPYRNMqthxwbvx6FF/Rw920YbyBWO3tnyPIqRMgHuSVsLmuHkkBS1Akyof463FVdkeDQ==}
+
+ prismjs@1.30.0:
+ resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==}
+ engines: {node: '>=6'}
+
readdirp@4.1.2:
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
@@ -854,6 +915,21 @@ packages:
undici-types@7.19.2:
resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==}
+ unist-util-is@4.1.0:
+ resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==}
+
+ unist-util-stringify-position@2.0.3:
+ resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==}
+
+ unist-util-visit-parents@3.1.1:
+ resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==}
+
+ unist-util-visit@2.0.3:
+ resolution: {integrity: sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==}
+
+ vfile-message@2.0.4:
+ resolution: {integrity: sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==}
+
vite-imagetools@9.0.3:
resolution: {integrity: sha512-FwjApRNZyN+RucPW9Z9kf0dyzyi3r3zlDfrTnzHXNaYpmT3pZ5w//d6QkApy1iypbDm+3fq+Gwfv+PYA4j4uYw==}
engines: {node: '>=20.0.0'}
@@ -1265,7 +1341,7 @@ snapshots:
dependencies:
'@sveltejs/kit': 2.57.1(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(svelte@5.55.3(@typescript-eslint/types@8.58.0))(typescript@5.9.3)(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
- '@sveltejs/enhanced-img@0.10.4(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(rollup@4.60.1)(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))':
+ '@sveltejs/enhanced-img@0.10.4(patch_hash=9a1c9b4c9cd4aefef304f2ebee4669210b8e93cf37300e82857392a6327dfbd8)(@sveltejs/vite-plugin-svelte@6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0)))(rollup@4.60.1)(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))':
dependencies:
'@sveltejs/vite-plugin-svelte': 6.2.4(svelte@5.55.3(@typescript-eslint/types@8.58.0))(vite@7.3.2(@types/node@25.6.0)(sass@1.99.0))
magic-string: 0.30.21
@@ -1319,6 +1395,10 @@ snapshots:
'@types/estree@1.0.8': {}
+ '@types/mdast@4.0.4':
+ dependencies:
+ '@types/unist': 2.0.11
+
'@types/node@25.6.0':
dependencies:
undici-types: 7.19.2
@@ -1326,6 +1406,8 @@ snapshots:
'@types/trusted-types@2.0.7': {}
+ '@types/unist@2.0.11': {}
+
'@typescript-eslint/types@8.58.0':
optional: true
@@ -1420,6 +1502,16 @@ snapshots:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.5
+ mdsvex@0.12.7(svelte@5.55.3(@typescript-eslint/types@8.58.0)):
+ dependencies:
+ '@types/mdast': 4.0.4
+ '@types/unist': 2.0.11
+ prism-svelte: 0.4.7
+ prismjs: 1.30.0
+ svelte: 5.55.3(@typescript-eslint/types@8.58.0)
+ unist-util-visit: 2.0.3
+ vfile-message: 2.0.4
+
mri@1.2.0: {}
mrmime@2.0.1: {}
@@ -1448,6 +1540,10 @@ snapshots:
prettier@3.8.2: {}
+ prism-svelte@0.4.7: {}
+
+ prismjs@1.30.0: {}
+
readdirp@4.1.2: {}
rollup@4.60.1:
@@ -1589,6 +1685,28 @@ snapshots:
undici-types@7.19.2:
optional: true
+ unist-util-is@4.1.0: {}
+
+ unist-util-stringify-position@2.0.3:
+ dependencies:
+ '@types/unist': 2.0.11
+
+ unist-util-visit-parents@3.1.1:
+ dependencies:
+ '@types/unist': 2.0.11
+ unist-util-is: 4.1.0
+
+ unist-util-visit@2.0.3:
+ dependencies:
+ '@types/unist': 2.0.11
+ unist-util-is: 4.1.0
+ unist-util-visit-parents: 3.1.1
+
+ vfile-message@2.0.4:
+ dependencies:
+ '@types/unist': 2.0.11
+ unist-util-stringify-position: 2.0.3
+
vite-imagetools@9.0.3(rollup@4.60.1):
dependencies:
'@rollup/pluginutils': 5.3.0(rollup@4.60.1)
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 2fc02cd..ce909a6 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -3,4 +3,7 @@ onlyBuiltDependencies:
- es5-ext
- esbuild
- sharp
- - "vite-plugin-image-tools"
+ - vite-plugin-image-tools
+
+patchedDependencies:
+ '@sveltejs/enhanced-img': patches/@sveltejs__enhanced-img.patch
diff --git a/src/lib/md_layout.svelte b/src/lib/md_layout.svelte
new file mode 100644
index 0000000..3f92de4
--- /dev/null
+++ b/src/lib/md_layout.svelte
@@ -0,0 +1,8 @@
+
+
+
+
+
+
diff --git a/src/lib/nav.svelte b/src/lib/nav.svelte
new file mode 100644
index 0000000..4e1f495
--- /dev/null
+++ b/src/lib/nav.svelte
@@ -0,0 +1,30 @@
+
+
+{#snippet NavBar()}
+
+{/snippet}
+
+
diff --git a/src/lib/web_buttons/webButtons.svelte b/src/lib/web_buttons/webButtons.svelte
index 1a33d0e..ead44a2 100644
--- a/src/lib/web_buttons/webButtons.svelte
+++ b/src/lib/web_buttons/webButtons.svelte
@@ -1,12 +1,13 @@
@@ -15,10 +16,8 @@
Doloro's corner of the internet
-
+ {@render NavBar()}
{@render SidebarLeft()}
diff --git a/src/routes/posts/+page.md b/src/routes/posts/+page.md
new file mode 100644
index 0000000..7a8ea82
--- /dev/null
+++ b/src/routes/posts/+page.md
@@ -0,0 +1,5 @@
+---
+title: meow
+---
+
+meow
diff --git a/svelte.config.js b/svelte.config.js
index a351ac6..95a9777 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -1,7 +1,9 @@
import adapter from "@sveltejs/adapter-static";
+import { mdsvex } from "mdsvex";
/** @type {import('@sveltejs/kit').Config} */
const config = {
+ extensions: [".svelte", ".md"],
kit: {
files: {
assets: "./static",
@@ -14,8 +16,22 @@ const config = {
fallback: undefined,
precompress: false,
strict: true
- })
- }
+ }),
+ },
+ preprocess: [
+ mdsvex({
+ // The default mdsvex extension is .svx; this overrides that.
+ extensions: [".md"],
+
+ layout: "$lib/md_layout.svelte",
+
+ // Adds IDs to headings, and anchor links to those IDs. Note: must stay in this order to work.
+ rehypePlugins: [
+ // rehypeSlug,
+ // rehypeAutolinkHeadings,
+ ],
+ }),
+ ],
};
export default config;