feat: support image optimization in Markdown with astro 5.4

This commit is contained in:
radishzzz 2025-03-12 13:57:32 +00:00
parent a133dfd7f2
commit 7ee47b1d85
15 changed files with 281 additions and 296 deletions

47
pnpm-lock.yaml generated
View file

@ -94,8 +94,8 @@ importers:
version: 6.2.1(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(yaml@2.7.0)
devDependencies:
'@antfu/eslint-config':
specifier: ^4.8.1
version: 4.8.1(@typescript-eslint/utils@8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@vue/compiler-sfc@3.5.13)(astro-eslint-parser@1.2.1)(eslint-plugin-astro@1.3.1(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2)
specifier: ^4.10.0
version: 4.10.0(@typescript-eslint/utils@8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@vue/compiler-sfc@3.5.13)(astro-eslint-parser@1.2.1)(eslint-plugin-astro@1.3.1(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2)
'@types/markdown-it':
specifier: ^14.1.2
version: 14.1.2
@ -151,8 +151,8 @@ packages:
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'}
'@antfu/eslint-config@4.8.1':
resolution: {integrity: sha512-RCMiqZzMeIhBj8NgtNUjw/cbrOneuAjTRfykGFNzNQnTV6iTgBIccG1T1fB8zekxPkkUDLiqrocNdPJCBGvRcA==}
'@antfu/eslint-config@4.10.0':
resolution: {integrity: sha512-w9/dkMrA9pMORrvRxVLokWhNwegijbD0cGhOmGlMyoyg1vK2daPM68dpIpJ8HFtGcFAP1KdJUoY/Wmw9o4QuhQ==}
hasBin: true
peerDependencies:
'@eslint-react/eslint-plugin': ^1.19.0
@ -209,8 +209,8 @@ packages:
peerDependencies:
typescript: ^5.0.0
'@astrojs/compiler@2.10.4':
resolution: {integrity: sha512-86B3QGagP99MvSNwuJGiYSBHnh8nLvm2Q1IFI15wIUJJsPeQTO3eb2uwBmrqRsXykeR/mBzH8XCgz5AAt1BJrQ==}
'@astrojs/compiler@2.11.0':
resolution: {integrity: sha512-zZOO7i+JhojO8qmlyR/URui6LyfHJY6m+L9nwyX5GiKD78YoRaZ5tzz6X0fkl+5bD3uwlDHayf6Oe8Fu36RKNg==}
'@astrojs/internal-helpers@0.6.1':
resolution: {integrity: sha512-l5Pqf6uZu31aG+3Lv8nl/3s4DbUzdlxTWDof4pEpto6GUJNhhCbelVi9dEyurOVyqaelwmS9oSyOWOENSfgo9A==}
@ -1760,8 +1760,8 @@ packages:
peerDependencies:
eslint: '>=8.45.0'
eslint-plugin-pnpm@0.1.2:
resolution: {integrity: sha512-Ta70r1MEUEv8Q5KqJBOklYE/Bal/qrCClu/jhLMC8US6emkYvYPgkoO4QCO/fmDECKU8GWZB8b91GIiapXbm2w==}
eslint-plugin-pnpm@0.3.1:
resolution: {integrity: sha512-vi5iHoELIAlBbX4AW8ZGzU3tUnfxuXhC/NKo3qRcI5o9igbz6zJUqSlQ03bPeMqWIGTPatZnbWsNR1RnlNERNQ==}
peerDependencies:
eslint: ^9.0.0
@ -2819,8 +2819,8 @@ packages:
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'}
pnpm-workspace-yaml@0.1.2:
resolution: {integrity: sha512-FaSo51Psz+jHV8YtnuIVemTheOIO5EnMtw0HSPTUsASEdOf3ppM5OBxKO5Dpvx4fWKNZF44vEEMFKc5YZG4qjA==}
pnpm-workspace-yaml@0.3.1:
resolution: {integrity: sha512-3nW5RLmREmZ8Pm8MbPsO2RM+99RRjYd25ynj3NV0cFsN7CcEl4sDFzgoFmSyduFwxFQ2Qbu3y2UdCh6HlyUOeA==}
postcss-selector-parser@6.1.2:
resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==}
@ -3754,7 +3754,7 @@ snapshots:
'@jridgewell/gen-mapping': 0.3.8
'@jridgewell/trace-mapping': 0.3.25
'@antfu/eslint-config@4.8.1(@typescript-eslint/utils@8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@vue/compiler-sfc@3.5.13)(astro-eslint-parser@1.2.1)(eslint-plugin-astro@1.3.1(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2)':
'@antfu/eslint-config@4.10.0(@typescript-eslint/utils@8.26.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2))(@vue/compiler-sfc@3.5.13)(astro-eslint-parser@1.2.1)(eslint-plugin-astro@1.3.1(eslint@9.22.0(jiti@2.4.2)))(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2)':
dependencies:
'@antfu/install-pkg': 1.0.0
'@clack/prompts': 0.10.0
@ -3778,7 +3778,7 @@ snapshots:
eslint-plugin-n: 17.16.2(eslint@9.22.0(jiti@2.4.2))
eslint-plugin-no-only-tests: 3.3.0
eslint-plugin-perfectionist: 4.10.1(eslint@9.22.0(jiti@2.4.2))(typescript@5.8.2)
eslint-plugin-pnpm: 0.1.2(eslint@9.22.0(jiti@2.4.2))
eslint-plugin-pnpm: 0.3.1(eslint@9.22.0(jiti@2.4.2))
eslint-plugin-regexp: 2.7.0(eslint@9.22.0(jiti@2.4.2))
eslint-plugin-toml: 0.12.0(eslint@9.22.0(jiti@2.4.2))
eslint-plugin-unicorn: 57.0.0(eslint@9.22.0(jiti@2.4.2))
@ -3823,13 +3823,13 @@ snapshots:
- prettier
- prettier-plugin-astro
'@astrojs/compiler@2.10.4': {}
'@astrojs/compiler@2.11.0': {}
'@astrojs/internal-helpers@0.6.1': {}
'@astrojs/language-server@2.15.4(typescript@5.8.2)':
dependencies:
'@astrojs/compiler': 2.10.4
'@astrojs/compiler': 2.11.0
'@astrojs/yaml2ts': 0.2.2
'@jridgewell/sourcemap-codec': 1.5.0
'@volar/kit': 2.4.12(typescript@5.8.2)
@ -5027,10 +5027,10 @@ snapshots:
astro-eslint-parser@1.2.1:
dependencies:
'@astrojs/compiler': 2.10.4
'@astrojs/compiler': 2.11.0
'@typescript-eslint/scope-manager': 8.26.1
'@typescript-eslint/types': 8.26.1
astrojs-compiler-sync: 1.0.1(@astrojs/compiler@2.10.4)
astrojs-compiler-sync: 1.0.1(@astrojs/compiler@2.11.0)
debug: 4.4.0
entities: 6.0.0
eslint-scope: 8.3.0
@ -5049,7 +5049,7 @@ snapshots:
astro@5.4.3(@types/node@22.13.10)(jiti@2.4.2)(lightningcss@1.28.2)(rollup@4.35.0)(terser@5.37.0)(typescript@5.8.2)(yaml@2.7.0):
dependencies:
'@astrojs/compiler': 2.10.4
'@astrojs/compiler': 2.11.0
'@astrojs/internal-helpers': 0.6.1
'@astrojs/markdown-remark': 6.2.1
'@astrojs/telemetry': 3.2.0
@ -5143,9 +5143,9 @@ snapshots:
- uploadthing
- yaml
astrojs-compiler-sync@1.0.1(@astrojs/compiler@2.10.4):
astrojs-compiler-sync@1.0.1(@astrojs/compiler@2.11.0):
dependencies:
'@astrojs/compiler': 2.10.4
'@astrojs/compiler': 2.11.0
synckit: 0.9.2
autosize@6.0.1: {}
@ -5662,12 +5662,15 @@ snapshots:
- supports-color
- typescript
eslint-plugin-pnpm@0.1.2(eslint@9.22.0(jiti@2.4.2)):
eslint-plugin-pnpm@0.3.1(eslint@9.22.0(jiti@2.4.2)):
dependencies:
eslint: 9.22.0(jiti@2.4.2)
find-up-simple: 1.0.1
jsonc-eslint-parser: 2.4.0
pnpm-workspace-yaml: 0.1.2
pathe: 2.0.3
pnpm-workspace-yaml: 0.3.1
tinyglobby: 0.2.12
yaml-eslint-parser: 1.3.0
eslint-plugin-regexp@2.7.0(eslint@9.22.0(jiti@2.4.2)):
dependencies:
@ -7138,7 +7141,7 @@ snapshots:
pluralize@8.0.0: {}
pnpm-workspace-yaml@0.1.2:
pnpm-workspace-yaml@0.3.1:
dependencies:
yaml: 2.7.0