mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 19:51:07 +02:00
feat: add waline i18n & sync comments
This commit is contained in:
parent
fa148ca0c5
commit
c2ebc78045
12 changed files with 172 additions and 101 deletions
8
.vscode/settings.json
vendored
8
.vscode/settings.json
vendored
|
@ -60,10 +60,12 @@
|
||||||
},
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"antfu",
|
"antfu",
|
||||||
|
"Artículos",
|
||||||
"astrojs",
|
"astrojs",
|
||||||
"attributify",
|
"attributify",
|
||||||
"blurhash",
|
"blurhash",
|
||||||
"bmoji",
|
"bmoji",
|
||||||
|
"Etiquetas",
|
||||||
"Frontmatter",
|
"Frontmatter",
|
||||||
"Fuwriu",
|
"Fuwriu",
|
||||||
"GSAP",
|
"GSAP",
|
||||||
|
@ -86,6 +88,7 @@
|
||||||
"rehype",
|
"rehype",
|
||||||
"Retypeset",
|
"Retypeset",
|
||||||
"Roundhand",
|
"Roundhand",
|
||||||
|
"Sobre",
|
||||||
"srcset",
|
"srcset",
|
||||||
"STIX",
|
"STIX",
|
||||||
"titlebar",
|
"titlebar",
|
||||||
|
@ -94,6 +97,9 @@
|
||||||
"unpic",
|
"unpic",
|
||||||
"vite",
|
"vite",
|
||||||
"waline",
|
"waline",
|
||||||
"weibo"
|
"weibo",
|
||||||
|
"Посты",
|
||||||
|
"себе",
|
||||||
|
"Теги"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"vite": "^6.2.0"
|
"vite": "^6.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^4.5.1",
|
"@antfu/eslint-config": "^4.6.0",
|
||||||
"@types/markdown-it": "^14.1.2",
|
"@types/markdown-it": "^14.1.2",
|
||||||
"@types/mdast": "^4.0.4",
|
"@types/mdast": "^4.0.4",
|
||||||
"@types/node": "^22.13.9",
|
"@types/node": "^22.13.9",
|
||||||
|
|
148
pnpm-lock.yaml
generated
148
pnpm-lock.yaml
generated
|
@ -94,8 +94,8 @@ importers:
|
||||||
version: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(yaml@2.7.0)
|
version: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(yaml@2.7.0)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@antfu/eslint-config':
|
'@antfu/eslint-config':
|
||||||
specifier: ^4.5.1
|
specifier: ^4.6.0
|
||||||
version: 4.5.1(@typescript-eslint/utils@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.21.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.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
version: 4.6.0(@typescript-eslint/utils@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.21.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.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
'@types/markdown-it':
|
'@types/markdown-it':
|
||||||
specifier: ^14.1.2
|
specifier: ^14.1.2
|
||||||
version: 14.1.2
|
version: 14.1.2
|
||||||
|
@ -151,8 +151,8 @@ packages:
|
||||||
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
||||||
engines: {node: '>=6.0.0'}
|
engines: {node: '>=6.0.0'}
|
||||||
|
|
||||||
'@antfu/eslint-config@4.5.1':
|
'@antfu/eslint-config@4.6.0':
|
||||||
resolution: {integrity: sha512-R/B0sdCELWX3LpB7oHtSiL5KWHke/7QyUCWUuag7U6GzyYJuLubmEHxXQg6/Wp8LoDX7MkvL7FdnKUUnOrcySQ==}
|
resolution: {integrity: sha512-uLfrbSQkIJZEiDWNVYaS0KENDecRujEos9LabmRvpCuZFGDcGkfTosZel3nnKjdc/2FX3bd6SSOdiaJuAKCw+Q==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@eslint-react/eslint-plugin': ^1.19.0
|
'@eslint-react/eslint-plugin': ^1.19.0
|
||||||
|
@ -510,8 +510,8 @@ packages:
|
||||||
resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==}
|
resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/markdown@6.2.2':
|
'@eslint/markdown@6.3.0':
|
||||||
resolution: {integrity: sha512-U0/KgzI9BVUuHDQ9M2fuVgB0QZ1fSyzwm8jKmHr1dlsLHGHYzoeIA9yqLMdTbV3ivZfp6rTdt6zqre3TfNExUQ==}
|
resolution: {integrity: sha512-8rj7wmuP5hwXZ0HWoad+WL9nftpN373bCCQz9QL6sA+clZiz7et8Pk0yDAKeo//xLlPONKQ6wCpjkOHCLkbYUw==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.6':
|
'@eslint/object-schema@2.1.6':
|
||||||
|
@ -1093,25 +1093,25 @@ packages:
|
||||||
vitest:
|
vitest:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@volar/kit@2.4.11':
|
'@volar/kit@2.4.12':
|
||||||
resolution: {integrity: sha512-ups5RKbMzMCr6RKafcCqDRnJhJDNWqo2vfekwOAj6psZ15v5TlcQFQAyokQJ3wZxVkzxrQM+TqTRDENfQEXpmA==}
|
resolution: {integrity: sha512-f9JE8oy9C2rBcCWxUYKUF23hOXz4mwgVXFjk7nHhxzplaoVjEOsKpBm8NI2nBH7Cwu8DRxDwBsbIxMl/8wlLxw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '*'
|
typescript: '*'
|
||||||
|
|
||||||
'@volar/language-core@2.4.11':
|
'@volar/language-core@2.4.12':
|
||||||
resolution: {integrity: sha512-lN2C1+ByfW9/JRPpqScuZt/4OrUUse57GLI6TbLgTIqBVemdl1wNcZ1qYGEo2+Gw8coYLgCy7SuKqn6IrQcQgg==}
|
resolution: {integrity: sha512-RLrFdXEaQBWfSnYGVxvR2WrO6Bub0unkdHYIdC31HzIEqATIuuhRRzYu76iGPZ6OtA4Au1SnW0ZwIqPP217YhA==}
|
||||||
|
|
||||||
'@volar/language-server@2.4.11':
|
'@volar/language-server@2.4.12':
|
||||||
resolution: {integrity: sha512-W9P8glH1M8LGREJ7yHRCANI5vOvTrRO15EMLdmh5WNF9sZYSEbQxiHKckZhvGIkbeR1WAlTl3ORTrJXUghjk7g==}
|
resolution: {integrity: sha512-KC0YqTXCZMaImMWyAKC+dLB2BXjfz80kqesJkV6oXxJsGEQPfmdqug299idwtrT6FVSmZ7q5UrPfvgKwA0S3JA==}
|
||||||
|
|
||||||
'@volar/language-service@2.4.11':
|
'@volar/language-service@2.4.12':
|
||||||
resolution: {integrity: sha512-KIb6g8gjUkS2LzAJ9bJCLIjfsJjeRtmXlu7b2pDFGD3fNqdbC53cCAKzgWDs64xtQVKYBU13DLWbtSNFtGuMLQ==}
|
resolution: {integrity: sha512-nifOPGYYPnCmxja6/ML/Gl2EgFkUdw4gLbYqbh8FjqX3gSpXSZl/0ebqORjKo1KW56YWHWRZd1jFutEtCiRYhA==}
|
||||||
|
|
||||||
'@volar/source-map@2.4.11':
|
'@volar/source-map@2.4.12':
|
||||||
resolution: {integrity: sha512-ZQpmafIGvaZMn/8iuvCFGrW3smeqkq/IIh9F1SdSx9aUl0J4Iurzd6/FhmjNO5g2ejF3rT45dKskgXWiofqlZQ==}
|
resolution: {integrity: sha512-bUFIKvn2U0AWojOaqf63ER0N/iHIBYZPpNGogfLPQ68F5Eet6FnLlyho7BS0y2HJ1jFhSif7AcuTx1TqsCzRzw==}
|
||||||
|
|
||||||
'@volar/typescript@2.4.11':
|
'@volar/typescript@2.4.12':
|
||||||
resolution: {integrity: sha512-2DT+Tdh88Spp5PyPbqhyoYavYCPDsqbHLFwcUI9K1NlY1YgUJvujGdrqUp0zWxnW7KWNTr3xSpMuv2WnaTKDAw==}
|
resolution: {integrity: sha512-HJB73OTJDgPc80K30wxi3if4fSsZZAOScbj2fcicMuOPoOkcf9NNAINb33o+DzhBdF9xTKC1gnPmIRDous5S0g==}
|
||||||
|
|
||||||
'@vscode/emmet-helper@2.11.0':
|
'@vscode/emmet-helper@2.11.0':
|
||||||
resolution: {integrity: sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw==}
|
resolution: {integrity: sha512-QLxjQR3imPZPQltfbWRnHU6JecWTF1QSWhx3GAKQpslx7y3Dp6sIIXhKjiUJ/BR9FX8PVthjr9PD6pNwOJfAzw==}
|
||||||
|
@ -1755,6 +1755,11 @@ packages:
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint: '>=8.0.0'
|
eslint: '>=8.0.0'
|
||||||
|
|
||||||
|
eslint-plugin-pnpm-catalogs@0.1.0:
|
||||||
|
resolution: {integrity: sha512-4FzIfTfr06U3ULStgSMSmpDsfhtxsbSAxKLvXLo+/i/z48v4+4WD0Yr5hTb6E37X/ch8isKiTl4bnnvSENTYFA==}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: ^9.0.0
|
||||||
|
|
||||||
eslint-plugin-regexp@2.7.0:
|
eslint-plugin-regexp@2.7.0:
|
||||||
resolution: {integrity: sha512-U8oZI77SBtH8U3ulZ05iu0qEzIizyEDXd+BWHvyVxTOjGwcDcvy/kEpgFG4DYca2ByRLiVPFZ2GeH7j1pdvZTA==}
|
resolution: {integrity: sha512-U8oZI77SBtH8U3ulZ05iu0qEzIizyEDXd+BWHvyVxTOjGwcDcvy/kEpgFG4DYca2ByRLiVPFZ2GeH7j1pdvZTA==}
|
||||||
engines: {node: ^18 || >=20}
|
engines: {node: ^18 || >=20}
|
||||||
|
@ -2850,6 +2855,9 @@ packages:
|
||||||
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
|
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
|
|
||||||
|
pnpm-catalogs-utils@0.1.0:
|
||||||
|
resolution: {integrity: sha512-avysWJc452htYTnae14ENYTI3fSzZ1U1xNrdSJ2kFgwDaDvdEKIM5Iu+WljP2cdr/HAKKQ1hnuvu3sQJ3Eq/zQ==}
|
||||||
|
|
||||||
postcss-selector-parser@6.1.2:
|
postcss-selector-parser@6.1.2:
|
||||||
resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==}
|
resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
|
@ -3761,8 +3769,8 @@ packages:
|
||||||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||||
engines: {node: '>=10'}
|
engines: {node: '>=10'}
|
||||||
|
|
||||||
yocto-queue@1.1.1:
|
yocto-queue@1.2.0:
|
||||||
resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==}
|
resolution: {integrity: sha512-KHBC7z61OJeaMGnF3wqNZj+GGNXOyypZviiKpQeiHirG5Ib1ImwcLBH70rbMSkKfSmUNBsdf2PwaEJtKvgmkNw==}
|
||||||
engines: {node: '>=12.20'}
|
engines: {node: '>=12.20'}
|
||||||
|
|
||||||
yocto-spinner@0.2.1:
|
yocto-spinner@0.2.1:
|
||||||
|
@ -3797,12 +3805,12 @@ snapshots:
|
||||||
'@jridgewell/gen-mapping': 0.3.8
|
'@jridgewell/gen-mapping': 0.3.8
|
||||||
'@jridgewell/trace-mapping': 0.3.25
|
'@jridgewell/trace-mapping': 0.3.25
|
||||||
|
|
||||||
'@antfu/eslint-config@4.5.1(@typescript-eslint/utils@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.21.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.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)':
|
'@antfu/eslint-config@4.6.0(@typescript-eslint/utils@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(@unocss/eslint-plugin@66.1.0-beta.3(eslint@9.21.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.21.0(jiti@2.4.2)))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@antfu/install-pkg': 1.0.0
|
'@antfu/install-pkg': 1.0.0
|
||||||
'@clack/prompts': 0.10.0
|
'@clack/prompts': 0.10.0
|
||||||
'@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.21.0(jiti@2.4.2))
|
'@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.21.0(jiti@2.4.2))
|
||||||
'@eslint/markdown': 6.2.2
|
'@eslint/markdown': 6.3.0
|
||||||
'@stylistic/eslint-plugin': 4.2.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
'@stylistic/eslint-plugin': 4.2.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
'@typescript-eslint/eslint-plugin': 8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
'@typescript-eslint/eslint-plugin': 8.26.0(@typescript-eslint/parser@8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
'@typescript-eslint/parser': 8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
'@typescript-eslint/parser': 8.26.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
|
@ -3821,6 +3829,7 @@ snapshots:
|
||||||
eslint-plugin-n: 17.16.2(eslint@9.21.0(jiti@2.4.2))
|
eslint-plugin-n: 17.16.2(eslint@9.21.0(jiti@2.4.2))
|
||||||
eslint-plugin-no-only-tests: 3.3.0
|
eslint-plugin-no-only-tests: 3.3.0
|
||||||
eslint-plugin-perfectionist: 4.9.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
eslint-plugin-perfectionist: 4.9.0(eslint@9.21.0(jiti@2.4.2))(typescript@5.8.2)
|
||||||
|
eslint-plugin-pnpm-catalogs: 0.1.0(eslint@9.21.0(jiti@2.4.2))
|
||||||
eslint-plugin-regexp: 2.7.0(eslint@9.21.0(jiti@2.4.2))
|
eslint-plugin-regexp: 2.7.0(eslint@9.21.0(jiti@2.4.2))
|
||||||
eslint-plugin-toml: 0.12.0(eslint@9.21.0(jiti@2.4.2))
|
eslint-plugin-toml: 0.12.0(eslint@9.21.0(jiti@2.4.2))
|
||||||
eslint-plugin-unicorn: 57.0.0(eslint@9.21.0(jiti@2.4.2))
|
eslint-plugin-unicorn: 57.0.0(eslint@9.21.0(jiti@2.4.2))
|
||||||
|
@ -3874,19 +3883,19 @@ snapshots:
|
||||||
'@astrojs/compiler': 2.10.4
|
'@astrojs/compiler': 2.10.4
|
||||||
'@astrojs/yaml2ts': 0.2.2
|
'@astrojs/yaml2ts': 0.2.2
|
||||||
'@jridgewell/sourcemap-codec': 1.5.0
|
'@jridgewell/sourcemap-codec': 1.5.0
|
||||||
'@volar/kit': 2.4.11(typescript@5.8.2)
|
'@volar/kit': 2.4.12(typescript@5.8.2)
|
||||||
'@volar/language-core': 2.4.11
|
'@volar/language-core': 2.4.12
|
||||||
'@volar/language-server': 2.4.11
|
'@volar/language-server': 2.4.12
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
fast-glob: 3.3.3
|
fast-glob: 3.3.3
|
||||||
muggle-string: 0.4.1
|
muggle-string: 0.4.1
|
||||||
volar-service-css: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-css: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-emmet: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-emmet: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-html: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-html: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-prettier: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-prettier: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-typescript: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-typescript: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-typescript-twoslash-queries: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-typescript-twoslash-queries: 0.0.62(@volar/language-service@2.4.12)
|
||||||
volar-service-yaml: 0.0.62(@volar/language-service@2.4.11)
|
volar-service-yaml: 0.0.62(@volar/language-service@2.4.12)
|
||||||
vscode-html-languageservice: 5.3.1
|
vscode-html-languageservice: 5.3.1
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -4170,7 +4179,7 @@ snapshots:
|
||||||
|
|
||||||
'@eslint/js@9.21.0': {}
|
'@eslint/js@9.21.0': {}
|
||||||
|
|
||||||
'@eslint/markdown@6.2.2':
|
'@eslint/markdown@6.3.0':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint/core': 0.10.0
|
'@eslint/core': 0.10.0
|
||||||
'@eslint/plugin-kit': 0.2.7
|
'@eslint/plugin-kit': 0.2.7
|
||||||
|
@ -4829,24 +4838,24 @@ snapshots:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
typescript: 5.8.2
|
typescript: 5.8.2
|
||||||
|
|
||||||
'@volar/kit@2.4.11(typescript@5.8.2)':
|
'@volar/kit@2.4.12(typescript@5.8.2)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
'@volar/typescript': 2.4.11
|
'@volar/typescript': 2.4.12
|
||||||
typesafe-path: 0.2.2
|
typesafe-path: 0.2.2
|
||||||
typescript: 5.8.2
|
typescript: 5.8.2
|
||||||
vscode-languageserver-textdocument: 1.0.12
|
vscode-languageserver-textdocument: 1.0.12
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
|
|
||||||
'@volar/language-core@2.4.11':
|
'@volar/language-core@2.4.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/source-map': 2.4.11
|
'@volar/source-map': 2.4.12
|
||||||
|
|
||||||
'@volar/language-server@2.4.11':
|
'@volar/language-server@2.4.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.11
|
'@volar/language-core': 2.4.12
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
'@volar/typescript': 2.4.11
|
'@volar/typescript': 2.4.12
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
request-light: 0.7.0
|
request-light: 0.7.0
|
||||||
vscode-languageserver: 9.0.1
|
vscode-languageserver: 9.0.1
|
||||||
|
@ -4854,18 +4863,18 @@ snapshots:
|
||||||
vscode-languageserver-textdocument: 1.0.12
|
vscode-languageserver-textdocument: 1.0.12
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
|
|
||||||
'@volar/language-service@2.4.11':
|
'@volar/language-service@2.4.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.11
|
'@volar/language-core': 2.4.12
|
||||||
vscode-languageserver-protocol: 3.17.5
|
vscode-languageserver-protocol: 3.17.5
|
||||||
vscode-languageserver-textdocument: 1.0.12
|
vscode-languageserver-textdocument: 1.0.12
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
|
|
||||||
'@volar/source-map@2.4.11': {}
|
'@volar/source-map@2.4.12': {}
|
||||||
|
|
||||||
'@volar/typescript@2.4.11':
|
'@volar/typescript@2.4.12':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@volar/language-core': 2.4.11
|
'@volar/language-core': 2.4.12
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
|
|
||||||
|
@ -5711,6 +5720,13 @@ snapshots:
|
||||||
- supports-color
|
- supports-color
|
||||||
- typescript
|
- typescript
|
||||||
|
|
||||||
|
eslint-plugin-pnpm-catalogs@0.1.0(eslint@9.21.0(jiti@2.4.2)):
|
||||||
|
dependencies:
|
||||||
|
eslint: 9.21.0(jiti@2.4.2)
|
||||||
|
find-up-simple: 1.0.1
|
||||||
|
jsonc-eslint-parser: 2.4.0
|
||||||
|
pnpm-catalogs-utils: 0.1.0
|
||||||
|
|
||||||
eslint-plugin-regexp@2.7.0(eslint@9.21.0(jiti@2.4.2)):
|
eslint-plugin-regexp@2.7.0(eslint@9.21.0(jiti@2.4.2)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@2.4.2))
|
'@eslint-community/eslint-utils': 4.4.1(eslint@9.21.0(jiti@2.4.2))
|
||||||
|
@ -7100,7 +7116,7 @@ snapshots:
|
||||||
|
|
||||||
p-limit@6.2.0:
|
p-limit@6.2.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
yocto-queue: 1.1.1
|
yocto-queue: 1.2.0
|
||||||
|
|
||||||
p-locate@4.1.0:
|
p-locate@4.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -7221,6 +7237,10 @@ snapshots:
|
||||||
|
|
||||||
pluralize@8.0.0: {}
|
pluralize@8.0.0: {}
|
||||||
|
|
||||||
|
pnpm-catalogs-utils@0.1.0:
|
||||||
|
dependencies:
|
||||||
|
yaml: 2.7.0
|
||||||
|
|
||||||
postcss-selector-parser@6.1.2:
|
postcss-selector-parser@6.1.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
cssesc: 3.0.0
|
cssesc: 3.0.0
|
||||||
|
@ -8053,44 +8073,44 @@ snapshots:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
vite: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(yaml@2.7.0)
|
vite: 6.2.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.28.2)(terser@5.37.0)(yaml@2.7.0)
|
||||||
|
|
||||||
volar-service-css@0.0.62(@volar/language-service@2.4.11):
|
volar-service-css@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-css-languageservice: 6.3.2
|
vscode-css-languageservice: 6.3.2
|
||||||
vscode-languageserver-textdocument: 1.0.12
|
vscode-languageserver-textdocument: 1.0.12
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-emmet@0.0.62(@volar/language-service@2.4.11):
|
volar-service-emmet@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@emmetio/css-parser': 0.4.0
|
'@emmetio/css-parser': 0.4.0
|
||||||
'@emmetio/html-matcher': 1.3.0
|
'@emmetio/html-matcher': 1.3.0
|
||||||
'@vscode/emmet-helper': 2.11.0
|
'@vscode/emmet-helper': 2.11.0
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-html@0.0.62(@volar/language-service@2.4.11):
|
volar-service-html@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-html-languageservice: 5.3.1
|
vscode-html-languageservice: 5.3.1
|
||||||
vscode-languageserver-textdocument: 1.0.12
|
vscode-languageserver-textdocument: 1.0.12
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-prettier@0.0.62(@volar/language-service@2.4.11):
|
volar-service-prettier@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-typescript-twoslash-queries@0.0.62(@volar/language-service@2.4.11):
|
volar-service-typescript-twoslash-queries@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-typescript@0.0.62(@volar/language-service@2.4.11):
|
volar-service-typescript@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
path-browserify: 1.0.1
|
path-browserify: 1.0.1
|
||||||
semver: 7.7.1
|
semver: 7.7.1
|
||||||
|
@ -8099,14 +8119,14 @@ snapshots:
|
||||||
vscode-nls: 5.2.0
|
vscode-nls: 5.2.0
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
volar-service-yaml@0.0.62(@volar/language-service@2.4.11):
|
volar-service-yaml@0.0.62(@volar/language-service@2.4.12):
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-uri: 3.1.0
|
vscode-uri: 3.1.0
|
||||||
yaml-language-server: 1.15.0
|
yaml-language-server: 1.15.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@volar/language-service': 2.4.11
|
'@volar/language-service': 2.4.12
|
||||||
|
|
||||||
vscode-css-languageservice@6.3.2:
|
vscode-css-languageservice@6.3.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -8263,7 +8283,7 @@ snapshots:
|
||||||
|
|
||||||
yocto-queue@0.1.0: {}
|
yocto-queue@0.1.0: {}
|
||||||
|
|
||||||
yocto-queue@1.1.1: {}
|
yocto-queue@1.2.0: {}
|
||||||
|
|
||||||
yocto-spinner@0.2.1:
|
yocto-spinner@0.2.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
@ -59,6 +59,6 @@ function setupThemeToggle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize click event (on first load or page transition)
|
// Initialize click event (on first load or page transition)
|
||||||
document.addEventListener('astro:after-swap', setupThemeToggle)
|
|
||||||
setupThemeToggle()
|
setupThemeToggle()
|
||||||
|
document.addEventListener('astro:after-swap', setupThemeToggle)
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,37 +1,48 @@
|
||||||
---
|
---
|
||||||
import { themeConfig } from '@/config'
|
import { themeConfig } from '@/config'
|
||||||
|
import { getWalineLang } from '@/utils/ui'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
serverURL = '',
|
serverURL = '',
|
||||||
emoji = [],
|
emoji = [],
|
||||||
searchGif = false,
|
search = false,
|
||||||
imageUploader = false,
|
imageUploader = false,
|
||||||
} = themeConfig.comment?.waline ?? {}
|
} = themeConfig.comment?.waline ?? {}
|
||||||
---
|
|
||||||
{serverURL && (
|
|
||||||
<>
|
|
||||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
|
||||||
<div id="waline"></div>
|
|
||||||
<script
|
|
||||||
is:inline
|
|
||||||
type="module"
|
|
||||||
define:vars={{ serverURL, emoji, searchGif, imageUploader }}
|
|
||||||
>
|
|
||||||
import { init } from 'https://unpkg.com/@waline/client@v3/dist/waline.js'
|
|
||||||
|
|
||||||
init({
|
const currentPath = Astro.url.pathname
|
||||||
el: '#waline',
|
const defaultLocale = themeConfig.global.locale
|
||||||
serverURL,
|
const walineLang = getWalineLang(currentPath, defaultLocale)
|
||||||
lang: 'zh',
|
|
||||||
emoji,
|
const walineConfigJson = JSON.stringify({
|
||||||
dark: 'auto',
|
serverURL,
|
||||||
requiredMeta: ['nick'],
|
lang: walineLang,
|
||||||
imageUploader: false,
|
emoji,
|
||||||
highlighter: false,
|
search,
|
||||||
texRenderer: false,
|
imageUploader,
|
||||||
search: searchGif,
|
});
|
||||||
reaction: false,
|
---
|
||||||
})
|
<div id="waline" data-config={walineConfigJson}></div>
|
||||||
</script>
|
|
||||||
</>
|
<script>
|
||||||
)}
|
import { init } from '@waline/client'
|
||||||
|
import '@waline/client/style'
|
||||||
|
|
||||||
|
function initWaline() {
|
||||||
|
const walineEl = document.getElementById('waline')
|
||||||
|
const walineConfig = JSON.parse(walineEl?.dataset.config || '{}')
|
||||||
|
|
||||||
|
init({
|
||||||
|
el: '#waline',
|
||||||
|
path: window.location.pathname.replace(/^\/([a-z]{2}(-[a-z]{2})?)\//, '/'),
|
||||||
|
dark: 'auto',
|
||||||
|
requiredMeta: ['nick'],
|
||||||
|
highlighter: false,
|
||||||
|
texRenderer: false,
|
||||||
|
reaction: [],
|
||||||
|
...walineConfig,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
initWaline()
|
||||||
|
document.addEventListener('astro:after-swap', initWaline)
|
||||||
|
</script>
|
||||||
|
|
0
src/components/Comments/index.astro
Normal file
0
src/components/Comments/index.astro
Normal file
|
@ -26,8 +26,8 @@ function initScrollbar() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('astro:after-swap', initScrollbar)
|
|
||||||
initScrollbar()
|
initScrollbar()
|
||||||
|
document.addEventListener('astro:after-swap', initScrollbar)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style is:global>
|
<style is:global>
|
||||||
|
|
|
@ -43,9 +43,13 @@ export const themeConfig: ThemeConfig = {
|
||||||
comment: {
|
comment: {
|
||||||
waline: {
|
waline: {
|
||||||
serverURL: 'https://comment.radishzz.cc', // Waline server URL
|
serverURL: 'https://comment.radishzz.cc', // Waline server URL
|
||||||
emoji: ['https://unpkg.com/@waline/emojis@1.2.0/tw-emoji'], // see more at https://waline.js.org/en/guide/features/emoji.html
|
emoji: [
|
||||||
searchGif: false, // whether to enable GIF search
|
'https://unpkg.com/@waline/emojis@1.2.0/tw-emoji',
|
||||||
imageUploader: false, // whether to enable image uploader
|
// 'https://unpkg.com/@waline/emojis@1.2.0/bmoji',
|
||||||
|
// see more at https://waline.js.org/en/guide/features/emoji.html
|
||||||
|
],
|
||||||
|
search: false, // whether to enable GIF search
|
||||||
|
imageUploader: false, // whether to enable image uploader. BUG:
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// COMMENT SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
// COMMENT SETTINGS >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> END
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
import Waline from '@/components/Comments/Waline.astro'
|
||||||
import Layout from '@/layouts/Layout.astro'
|
import Layout from '@/layouts/Layout.astro'
|
||||||
import { checkSlugDuplication } from '@/utils/content'
|
import { checkSlugDuplication } from '@/utils/content'
|
||||||
import { generateMultiLangPostPaths } from '@/utils/i18n'
|
import { generateMultiLangPostPaths } from '@/utils/i18n'
|
||||||
|
@ -28,4 +29,5 @@ const { Content, remarkPluginFrontmatter } = await post.render()
|
||||||
</time>
|
</time>
|
||||||
<Content />
|
<Content />
|
||||||
</article>
|
</article>
|
||||||
|
<Waline />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
---
|
---
|
||||||
|
import Waline from '@/components/Comments/Waline.astro'
|
||||||
import Layout from '@/layouts/Layout.astro'
|
import Layout from '@/layouts/Layout.astro'
|
||||||
import { checkSlugDuplication } from '@/utils/content'
|
import { checkSlugDuplication } from '@/utils/content'
|
||||||
import { generatePostPaths } from '@/utils/i18n'
|
import { generatePostPaths } from '@/utils/i18n'
|
||||||
import { getCollection } from 'astro:content'
|
import { getCollection } from 'astro:content'
|
||||||
import Waline from '@/components/Comments/Waline.astro'
|
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const posts = await getCollection('posts')
|
const posts = await getCollection('posts')
|
||||||
|
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
|
@ -40,7 +40,7 @@ export interface ThemeConfig {
|
||||||
waline?: {
|
waline?: {
|
||||||
serverURL?: string
|
serverURL?: string
|
||||||
emoji?: string[]
|
emoji?: string[]
|
||||||
searchGif?: boolean
|
search?: boolean
|
||||||
imageUploader?: boolean
|
imageUploader?: boolean
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,18 @@ export const langMap: Record<string, string[]> = {
|
||||||
'es': ['es-ES'],
|
'es': ['es-ES'],
|
||||||
'ru': ['ru-RU'],
|
'ru': ['ru-RU'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Waline Language Map
|
||||||
|
// see more at https://waline.js.org/guide/i18n.html
|
||||||
|
export const walineLocaleMap: Record<string, string> = {
|
||||||
|
'zh': 'zh-CN',
|
||||||
|
'zh-tw': 'zh-TW',
|
||||||
|
'ja': 'jp-JP', // Waline uses jp-JP not ja-JP
|
||||||
|
'en': 'en-US',
|
||||||
|
'es': 'es-ES',
|
||||||
|
'ru': 'ru-RU',
|
||||||
|
}
|
||||||
|
|
||||||
// Standard Language Code
|
// Standard Language Code
|
||||||
export const langCode = Object.values(langMap).flat()
|
export const langCode = Object.values(langMap).flat()
|
||||||
// Abbreviated Language Code
|
// Abbreviated Language Code
|
||||||
|
@ -44,3 +56,19 @@ export const ui = {
|
||||||
about: 'О себе',
|
about: 'О себе',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the language code of Waline
|
||||||
|
* @param currentPath Current page path
|
||||||
|
* @param defaultLocale Default language
|
||||||
|
* @returns Corresponding Waline language code
|
||||||
|
*/
|
||||||
|
export function getWalineLang(currentPath: string, defaultLocale: string): string {
|
||||||
|
// Extract language code from path
|
||||||
|
const pathLang = Object.keys(walineLocaleMap).find(code =>
|
||||||
|
currentPath.startsWith(`/${code}/`),
|
||||||
|
)
|
||||||
|
// Return found path language or default language
|
||||||
|
const lang = pathLang || defaultLocale
|
||||||
|
return walineLocaleMap[lang as keyof typeof walineLocaleMap]
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue