astro-pure 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/bun.lock +34 -36
- package/components/advanced/GithubCard.astro +11 -6
- package/components/basic/Footer.astro +1 -2
- package/components/basic/Header.astro +1 -1
- package/components/pages/PostPreview.astro +1 -1
- package/components/user/Button.astro +12 -4
- package/components/user/Collapse.astro +1 -0
- package/package.json +5 -5
- package/types/integrations-config.ts +5 -1
- package/types/theme-config.ts +2 -0
- package/utils/rehype-external-links.ts +73 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Astro Theme Pure (Integration Package)
|
|
2
2
|
|
|
3
|
-
A simple, fast and powerful blog theme built by Astro.
|
|
3
|
+
A simple, fast and powerful blog & document theme built by Astro.
|
|
4
4
|
|
|
5
5
|
[](https://astro-pure.js.org/)
|
|
6
6
|
[](https://www.npmjs.com/package/astro-pure)
|
|
@@ -16,7 +16,17 @@ See [Getting Started](https://astro-pure.js.org/docs/setup/getting-started).
|
|
|
16
16
|
|
|
17
17
|
### Use with common Astro project
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
See [User Components](https://astro-pure.js.org/docs/integrations/components) & [Advanced Components](https://astro-pure.js.org/docs/integrations/advanced) to learn how to use.
|
|
20
|
+
|
|
21
|
+
> Some part of Advanced Components may require Astro Integration config.
|
|
22
|
+
|
|
23
|
+
#### UnoCSS
|
|
24
|
+
|
|
25
|
+
UnoCSS is more recommended, and TailwindCSS method will be removed soon.
|
|
26
|
+
|
|
27
|
+
#### TailwindCSS V3
|
|
28
|
+
|
|
29
|
+
Set up tailwindcss v3 in your project.
|
|
20
30
|
|
|
21
31
|
```js
|
|
22
32
|
// tailwind.config.mjs
|
|
@@ -32,12 +42,6 @@ const config = {
|
|
|
32
42
|
export default config
|
|
33
43
|
```
|
|
34
44
|
|
|
35
|
-
UnoCSS is more recommended, and TailwindCSS method will be removed soon.
|
|
36
|
-
|
|
37
|
-
See [User Components](https://astro-pure.js.org/docs/integrations/components) & [Advanced Components](https://astro-pure.js.org/docs/integrations/advanced) to learn how to use.
|
|
38
|
-
|
|
39
|
-
> Some part of Advanced Components may require Astro Integration config.
|
|
40
|
-
|
|
41
45
|
## Cli
|
|
42
46
|
|
|
43
47
|
```shell
|
package/bun.lock
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"name": "astro-pure",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@astrojs/mdx": "^4.3.0",
|
|
8
|
-
"@astrojs/sitemap": "^3.4.
|
|
8
|
+
"@astrojs/sitemap": "^3.4.1",
|
|
9
9
|
"@pagefind/default-ui": "^1.3.0",
|
|
10
|
-
"
|
|
10
|
+
"@unocss/reset": "^66.3.3",
|
|
11
|
+
"astro": "^5.11.1",
|
|
11
12
|
"hast-util-select": "^6.0.4",
|
|
12
13
|
"node-html-parser": "^7.0.1",
|
|
13
14
|
"pagefind": "^1.3.0",
|
|
14
|
-
"
|
|
15
|
-
"unocss": "66",
|
|
15
|
+
"unocss": "^66.3.3",
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
},
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
"@antfu/utils": ["@antfu/utils@8.1.1", "https://registry.npmmirror.com/@antfu/utils/-/utils-8.1.1.tgz", {}, "sha512-Mex9nXf9vR6AhcXmMrlz/HVgYYZpVGJ6YlPgwl7UnaFpnshXs6EK/oa5Gpf3CzENMjkvEx2tQtntGnb7UtSTOQ=="],
|
|
25
25
|
|
|
26
|
-
"@astrojs/compiler": ["@astrojs/compiler@2.12.
|
|
26
|
+
"@astrojs/compiler": ["@astrojs/compiler@2.12.2", "https://registry.npmmirror.com/@astrojs/compiler/-/compiler-2.12.2.tgz", {}, "sha512-w2zfvhjNCkNMmMMOn5b0J8+OmUaBL1o40ipMvqcG6NRpdC+lKxmTi48DT8Xw0SzJ3AfmeFLB45zXZXtmbsjcgw=="],
|
|
27
27
|
|
|
28
28
|
"@astrojs/internal-helpers": ["@astrojs/internal-helpers@0.6.1", "https://registry.npmmirror.com/@astrojs/internal-helpers/-/internal-helpers-0.6.1.tgz", {}, "sha512-l5Pqf6uZu31aG+3Lv8nl/3s4DbUzdlxTWDof4pEpto6GUJNhhCbelVi9dEyurOVyqaelwmS9oSyOWOENSfgo9A=="],
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
"@astrojs/prism": ["@astrojs/prism@3.3.0", "https://registry.npmmirror.com/@astrojs/prism/-/prism-3.3.0.tgz", { "dependencies": { "prismjs": "^1.30.0" } }, "sha512-q8VwfU/fDZNoDOf+r7jUnMC2//H2l0TuQ6FkGJL8vD8nw/q5KiL3DS1KKBI3QhI9UQhpJ5dc7AtqfbXWuOgLCQ=="],
|
|
35
35
|
|
|
36
|
-
"@astrojs/sitemap": ["@astrojs/sitemap@3.4.
|
|
36
|
+
"@astrojs/sitemap": ["@astrojs/sitemap@3.4.1", "https://registry.npmmirror.com/@astrojs/sitemap/-/sitemap-3.4.1.tgz", { "dependencies": { "sitemap": "^8.0.0", "stream-replace-string": "^2.0.0", "zod": "^3.24.2" } }, "sha512-VjZvr1e4FH6NHyyHXOiQgLiw94LnCVY4v06wN/D0gZKchTMkg71GrAHJz81/huafcmavtLkIv26HnpfDq6/h/Q=="],
|
|
37
37
|
|
|
38
38
|
"@astrojs/telemetry": ["@astrojs/telemetry@3.3.0", "https://registry.npmmirror.com/@astrojs/telemetry/-/telemetry-3.3.0.tgz", { "dependencies": { "ci-info": "^4.2.0", "debug": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^3.0.0", "is-wsl": "^3.1.0", "which-pm-runs": "^1.1.0" } }, "sha512-UFBgfeldP06qu6khs/yY+q1cDAaArM2/7AEIqQ9Cuvf7B1hNLq0xDrZkct+QoIGyjq56y8IaE2I3CTvG99mlhQ=="],
|
|
39
39
|
|
|
@@ -257,53 +257,53 @@
|
|
|
257
257
|
|
|
258
258
|
"@ungap/structured-clone": ["@ungap/structured-clone@1.3.0", "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.3.0.tgz", {}, "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g=="],
|
|
259
259
|
|
|
260
|
-
"@unocss/astro": ["@unocss/astro@66.
|
|
260
|
+
"@unocss/astro": ["@unocss/astro@66.3.3", "https://registry.npmmirror.com/@unocss/astro/-/astro-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/reset": "66.3.3", "@unocss/vite": "66.3.3" }, "peerDependencies": { "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0" }, "optionalPeers": ["vite"] }, "sha512-q26EfadSMmEXZpWDKsJF9anBCfhYDmWljVpDZ2Wo8K48IbZMUXrWfiAiUc6ijE/A/rADfHk8bp3a3GE01t3I9A=="],
|
|
261
261
|
|
|
262
|
-
"@unocss/cli": ["@unocss/cli@66.
|
|
262
|
+
"@unocss/cli": ["@unocss/cli@66.3.3", "https://registry.npmmirror.com/@unocss/cli/-/cli-66.3.3.tgz", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@unocss/config": "66.3.3", "@unocss/core": "66.3.3", "@unocss/preset-uno": "66.3.3", "cac": "^6.7.14", "chokidar": "^3.6.0", "colorette": "^2.0.20", "consola": "^3.4.2", "magic-string": "^0.30.17", "pathe": "^2.0.3", "perfect-debounce": "^1.0.0", "tinyglobby": "^0.2.14", "unplugin-utils": "^0.2.4" }, "bin": { "unocss": "bin/unocss.mjs" } }, "sha512-U0HoDcwi/DetqP5zDT3dfxG94pC3TI0PfxmpdTfPY7xEylIdLbV89fb70CvJVysDSQJIuw6TYwqS1ZlHoYNKTA=="],
|
|
263
263
|
|
|
264
|
-
"@unocss/config": ["@unocss/config@66.
|
|
264
|
+
"@unocss/config": ["@unocss/config@66.3.3", "https://registry.npmmirror.com/@unocss/config/-/config-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "unconfig": "^7.3.2" } }, "sha512-D/UxnAmkabapqWU4tF85dWWhNfCUyNutWmd4AD2VsQRZOykufJedLV74r3Z3XhoPJn4IGr3BKZm5/rflf5viDg=="],
|
|
265
265
|
|
|
266
|
-
"@unocss/core": ["@unocss/core@66.
|
|
266
|
+
"@unocss/core": ["@unocss/core@66.3.3", "https://registry.npmmirror.com/@unocss/core/-/core-66.3.3.tgz", {}, "sha512-6WFLd92TJelVQARtCGaF+EgEoHKIVe43gkGXVoWILu0HUDRWdhv+cpcyX0RTJV22Y976AxeneU7/zmhAh+CXNg=="],
|
|
267
267
|
|
|
268
|
-
"@unocss/extractor-arbitrary-variants": ["@unocss/extractor-arbitrary-variants@66.
|
|
268
|
+
"@unocss/extractor-arbitrary-variants": ["@unocss/extractor-arbitrary-variants@66.3.3", "https://registry.npmmirror.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-TXzjH6FcITQ8V2x7ETHgVOlAHf3ll/ysxL+W4fMROm8jP/o7jvsg36tRfOwU0sDGo/qoCPux82ix9e6/JW0oqQ=="],
|
|
269
269
|
|
|
270
|
-
"@unocss/inspector": ["@unocss/inspector@66.
|
|
270
|
+
"@unocss/inspector": ["@unocss/inspector@66.3.3", "https://registry.npmmirror.com/@unocss/inspector/-/inspector-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/rule-utils": "66.3.3", "colorette": "^2.0.20", "gzip-size": "^6.0.0", "sirv": "^3.0.1", "vue-flow-layout": "^0.1.1" } }, "sha512-NsK1WRWez2Mzk4+ophtBdXel8nGaPkIDa9lYSFMdKLF/1jNW23txeEL8CsD6/CK8K0BsR11rhLKhUrzyrjfBSQ=="],
|
|
271
271
|
|
|
272
|
-
"@unocss/postcss": ["@unocss/postcss@66.
|
|
272
|
+
"@unocss/postcss": ["@unocss/postcss@66.3.3", "https://registry.npmmirror.com/@unocss/postcss/-/postcss-66.3.3.tgz", { "dependencies": { "@unocss/config": "66.3.3", "@unocss/core": "66.3.3", "@unocss/rule-utils": "66.3.3", "css-tree": "^3.1.0", "postcss": "^8.5.6", "tinyglobby": "^0.2.14" } }, "sha512-VKq+BtfPIZbLeAeZFprtKZJAyFBOqA8qpQm+vmWBiBia70JzkwfF2SMNIHiGt022yRo9ZmjnI9uRTxSzqXUsUQ=="],
|
|
273
273
|
|
|
274
|
-
"@unocss/preset-attributify": ["@unocss/preset-attributify@66.
|
|
274
|
+
"@unocss/preset-attributify": ["@unocss/preset-attributify@66.3.3", "https://registry.npmmirror.com/@unocss/preset-attributify/-/preset-attributify-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-22+0Cqqu09q+xHfZ3Wk8Coxe5m6PmpgWz4U5xrEC8056UfG3Q1KEqoCxy2wySJIq8SqxQ30Nlll7oMa31B8Krw=="],
|
|
275
275
|
|
|
276
|
-
"@unocss/preset-icons": ["@unocss/preset-icons@66.
|
|
276
|
+
"@unocss/preset-icons": ["@unocss/preset-icons@66.3.3", "https://registry.npmmirror.com/@unocss/preset-icons/-/preset-icons-66.3.3.tgz", { "dependencies": { "@iconify/utils": "^2.3.0", "@unocss/core": "66.3.3", "ofetch": "^1.4.1" } }, "sha512-Bmhiev05BN/horlgnyZ8gzQWZKd7oVpUBWD66X7U/dgkLdO6B5GIIsdO5Fi7JLeMDmyXm6vlYk0YQhiTbx8l9w=="],
|
|
277
277
|
|
|
278
|
-
"@unocss/preset-mini": ["@unocss/preset-mini@66.
|
|
278
|
+
"@unocss/preset-mini": ["@unocss/preset-mini@66.3.3", "https://registry.npmmirror.com/@unocss/preset-mini/-/preset-mini-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/extractor-arbitrary-variants": "66.3.3", "@unocss/rule-utils": "66.3.3" } }, "sha512-pz8rgvHRYS/6fsZNtG7iArLzwANnLy5GkHY/lbuqkWhO2S2Nf7kpJCbR/uV/XeuFsLnYcZW3NLOmelfvZvJamA=="],
|
|
279
279
|
|
|
280
|
-
"@unocss/preset-tagify": ["@unocss/preset-tagify@66.
|
|
280
|
+
"@unocss/preset-tagify": ["@unocss/preset-tagify@66.3.3", "https://registry.npmmirror.com/@unocss/preset-tagify/-/preset-tagify-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-L1Ez7Y4uBaW+wiv1BOQygpfhseSt3EZ53jqkl7fxl1EKVsJy6SuZgJxlXEHUYp9xYdSp6EHq2CfL8UevaR+loA=="],
|
|
281
281
|
|
|
282
|
-
"@unocss/preset-typography": ["@unocss/preset-typography@66.
|
|
282
|
+
"@unocss/preset-typography": ["@unocss/preset-typography@66.3.3", "https://registry.npmmirror.com/@unocss/preset-typography/-/preset-typography-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/preset-mini": "66.3.3", "@unocss/rule-utils": "66.3.3" } }, "sha512-aQXiGCObvWD9grfUpm0d5nzN+Cpvag0rHP39UjUKb0xSTzY09VzwDrua4kWVO5wJLNK6/L70osyhEgmC3qToxA=="],
|
|
283
283
|
|
|
284
|
-
"@unocss/preset-uno": ["@unocss/preset-uno@66.
|
|
284
|
+
"@unocss/preset-uno": ["@unocss/preset-uno@66.3.3", "https://registry.npmmirror.com/@unocss/preset-uno/-/preset-uno-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/preset-wind3": "66.3.3" } }, "sha512-Tiho4LidpuMHrB19GHTU6XrL0A5eFELHk9ebQ/3WeTy+K/9a6Hn5zsHJe5UCtOsEcUdKB33oZx0hXUp93hb/YQ=="],
|
|
285
285
|
|
|
286
|
-
"@unocss/preset-web-fonts": ["@unocss/preset-web-fonts@66.
|
|
286
|
+
"@unocss/preset-web-fonts": ["@unocss/preset-web-fonts@66.3.3", "https://registry.npmmirror.com/@unocss/preset-web-fonts/-/preset-web-fonts-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "ofetch": "^1.4.1" } }, "sha512-ysKZeC7TXxRiqnNL9GxZFGMKFAHXrcaqozPaEOIJ40dvzbJt8IMLyFndZkcFMcgDCV0pFh/y37mGxxxARO9+pQ=="],
|
|
287
287
|
|
|
288
|
-
"@unocss/preset-wind": ["@unocss/preset-wind@66.
|
|
288
|
+
"@unocss/preset-wind": ["@unocss/preset-wind@66.3.3", "https://registry.npmmirror.com/@unocss/preset-wind/-/preset-wind-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/preset-wind3": "66.3.3" } }, "sha512-3Mxl/TDPcv8nNKdFe3WKdlXE6de+lCaaizEH86BILW3ZeyPU9aKzWcZIoxohla0a6zMxDQ2+Gf+7EwaOvpqo7Q=="],
|
|
289
289
|
|
|
290
|
-
"@unocss/preset-wind3": ["@unocss/preset-wind3@66.
|
|
290
|
+
"@unocss/preset-wind3": ["@unocss/preset-wind3@66.3.3", "https://registry.npmmirror.com/@unocss/preset-wind3/-/preset-wind3-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/preset-mini": "66.3.3", "@unocss/rule-utils": "66.3.3" } }, "sha512-iXmjvPqvmPTo4z7epQDqHxzlGRsbLJEgfETqTrRJeagvFG7Gs+ajS8cQhbf6wL01dSRHjvhVXi3MsIvqfHHXOw=="],
|
|
291
291
|
|
|
292
|
-
"@unocss/preset-wind4": ["@unocss/preset-wind4@66.
|
|
292
|
+
"@unocss/preset-wind4": ["@unocss/preset-wind4@66.3.3", "https://registry.npmmirror.com/@unocss/preset-wind4/-/preset-wind4-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/extractor-arbitrary-variants": "66.3.3", "@unocss/rule-utils": "66.3.3" } }, "sha512-JSJTXVJel6kX+u4Ktt6JGnukYWYhKxmjgORTwclUpokRHgEoD+xsh0Rz4YGJ1fWSnzNslNQhWP9yDRByVPHWwA=="],
|
|
293
293
|
|
|
294
|
-
"@unocss/reset": ["@unocss/reset@66.
|
|
294
|
+
"@unocss/reset": ["@unocss/reset@66.3.3", "https://registry.npmmirror.com/@unocss/reset/-/reset-66.3.3.tgz", {}, "sha512-VIeR/mIcCL89/1uA1KM1QCYca4aeIGqEHMTJL1nCD4v+7wk6XhNXhsp5gMIHo+V804SUSmATWaeHTiKpiFu7AQ=="],
|
|
295
295
|
|
|
296
|
-
"@unocss/rule-utils": ["@unocss/rule-utils@66.
|
|
296
|
+
"@unocss/rule-utils": ["@unocss/rule-utils@66.3.3", "https://registry.npmmirror.com/@unocss/rule-utils/-/rule-utils-66.3.3.tgz", { "dependencies": { "@unocss/core": "^66.3.3", "magic-string": "^0.30.17" } }, "sha512-QKgVGV5nRRnK44/reUKFLAc5UGyl98vz3hrfk8JI8pVza58vmQWTdAB2rIpNJ5a5j+EkWfDOUlGQaOrIeYGLdg=="],
|
|
297
297
|
|
|
298
|
-
"@unocss/transformer-attributify-jsx": ["@unocss/transformer-attributify-jsx@66.
|
|
298
|
+
"@unocss/transformer-attributify-jsx": ["@unocss/transformer-attributify-jsx@66.3.3", "https://registry.npmmirror.com/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-ENNYFk5wrI4jlxn0tWGeR9QGxflAfZue3X2ABg0KSVOiYyIOsrHqtdoiLYkuCA9idRlBZPQxePJKcPWt1r/tYA=="],
|
|
299
299
|
|
|
300
|
-
"@unocss/transformer-compile-class": ["@unocss/transformer-compile-class@66.
|
|
300
|
+
"@unocss/transformer-compile-class": ["@unocss/transformer-compile-class@66.3.3", "https://registry.npmmirror.com/@unocss/transformer-compile-class/-/transformer-compile-class-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-VTEFuwp3iajGWyEFwmO5LRvOjgZM1TK+4rX5Q79xyTAPkLAKgOa03Ne8+kU8oG0TQEa4mXVw6ul9McM7UBJh1w=="],
|
|
301
301
|
|
|
302
|
-
"@unocss/transformer-directives": ["@unocss/transformer-directives@66.
|
|
302
|
+
"@unocss/transformer-directives": ["@unocss/transformer-directives@66.3.3", "https://registry.npmmirror.com/@unocss/transformer-directives/-/transformer-directives-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3", "@unocss/rule-utils": "66.3.3", "css-tree": "^3.1.0" } }, "sha512-11T7fmYk/XZcqFDn4qiIvs04mJhUtAoha5Y99bVE+L3byWa6BT4jb5aSAKk+24q5aynwgB++4RgfQxarj69WTw=="],
|
|
303
303
|
|
|
304
|
-
"@unocss/transformer-variant-group": ["@unocss/transformer-variant-group@66.
|
|
304
|
+
"@unocss/transformer-variant-group": ["@unocss/transformer-variant-group@66.3.3", "https://registry.npmmirror.com/@unocss/transformer-variant-group/-/transformer-variant-group-66.3.3.tgz", { "dependencies": { "@unocss/core": "66.3.3" } }, "sha512-uhK81pbJfXJFYaXxOoIFVEG8/Kx1iaAkTwRB6c+WNUfl9GiKyYQcrI7bETgCPPbg230Z68jVICBgBATeLJ31vQ=="],
|
|
305
305
|
|
|
306
|
-
"@unocss/vite": ["@unocss/vite@66.
|
|
306
|
+
"@unocss/vite": ["@unocss/vite@66.3.3", "https://registry.npmmirror.com/@unocss/vite/-/vite-66.3.3.tgz", { "dependencies": { "@ampproject/remapping": "^2.3.0", "@unocss/config": "66.3.3", "@unocss/core": "66.3.3", "@unocss/inspector": "66.3.3", "chokidar": "^3.6.0", "magic-string": "^0.30.17", "pathe": "^2.0.3", "tinyglobby": "^0.2.14", "unplugin-utils": "^0.2.4" }, "peerDependencies": { "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0" } }, "sha512-uu3smeEW6q36ri6vydRx2GiTGF5O/J80Fr4GLmLiwfpt2YnPHraO7XHVR5/mwG2Oz5Kov0uGvxVsdgxZABKRgw=="],
|
|
307
307
|
|
|
308
308
|
"@vue/compiler-core": ["@vue/compiler-core@3.5.13", "https://registry.npmmirror.com/@vue/compiler-core/-/compiler-core-3.5.13.tgz", { "dependencies": { "@babel/parser": "^7.25.3", "@vue/shared": "3.5.13", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q=="],
|
|
309
309
|
|
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
|
|
346
346
|
"astring": ["astring@1.9.0", "https://registry.npmmirror.com/astring/-/astring-1.9.0.tgz", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="],
|
|
347
347
|
|
|
348
|
-
"astro": ["astro@5.
|
|
348
|
+
"astro": ["astro@5.11.1", "https://registry.npmmirror.com/astro/-/astro-5.11.1.tgz", { "dependencies": { "@astrojs/compiler": "^2.12.2", "@astrojs/internal-helpers": "0.6.1", "@astrojs/markdown-remark": "6.3.2", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^2.4.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.1.4", "acorn": "^8.14.1", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "boxen": "8.0.1", "ci-info": "^4.2.0", "clsx": "^2.1.1", "common-ancestor-path": "^1.0.1", "cookie": "^1.0.2", "cssesc": "^3.0.0", "debug": "^4.4.0", "deterministic-object-hash": "^2.0.2", "devalue": "^5.1.1", "diff": "^5.2.0", "dlv": "^1.1.3", "dset": "^3.1.4", "es-module-lexer": "^1.6.0", "esbuild": "^0.25.0", "estree-walker": "^3.0.3", "flattie": "^1.1.1", "fontace": "~0.3.0", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.1.1", "import-meta-resolve": "^4.1.0", "js-yaml": "^4.1.0", "kleur": "^4.1.5", "magic-string": "^0.30.17", "magicast": "^0.3.5", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.0", "package-manager-detector": "^1.1.0", "picomatch": "^4.0.2", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.1", "shiki": "^3.2.1", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.12", "tsconfck": "^3.1.5", "ultrahtml": "^1.6.0", "unifont": "~0.5.0", "unist-util-visit": "^5.0.0", "unstorage": "^1.15.0", "vfile": "^6.0.3", "vite": "^6.3.4", "vitefu": "^1.0.6", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.1", "zod": "^3.24.2", "zod-to-json-schema": "^3.24.5", "zod-to-ts": "^1.2.0" }, "optionalDependencies": { "sharp": "^0.33.3" }, "bin": { "astro": "astro.js" } }, "sha512-32dpUh0tXSV/FR2q2/z7LOA6IXl7RqET9J51IA0pPSSi3exhRP3EOSQGjBq10DzXT7VrvplDrFqwfiiWBS8oYA=="],
|
|
349
349
|
|
|
350
350
|
"axobject-query": ["axobject-query@4.1.0", "https://registry.npmmirror.com/axobject-query/-/axobject-query-4.1.0.tgz", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="],
|
|
351
351
|
|
|
@@ -575,8 +575,6 @@
|
|
|
575
575
|
|
|
576
576
|
"iron-webcrypto": ["iron-webcrypto@1.2.1", "https://registry.npmmirror.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz", {}, "sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg=="],
|
|
577
577
|
|
|
578
|
-
"is-absolute-url": ["is-absolute-url@4.0.1", "https://registry.npmmirror.com/is-absolute-url/-/is-absolute-url-4.0.1.tgz", {}, "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A=="],
|
|
579
|
-
|
|
580
578
|
"is-alphabetical": ["is-alphabetical@2.0.1", "https://registry.npmmirror.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz", {}, "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ=="],
|
|
581
579
|
|
|
582
580
|
"is-alphanumerical": ["is-alphanumerical@2.0.1", "https://registry.npmmirror.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", { "dependencies": { "is-alphabetical": "^2.0.0", "is-decimal": "^2.0.0" } }, "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw=="],
|
|
@@ -823,8 +821,6 @@
|
|
|
823
821
|
|
|
824
822
|
"rehype": ["rehype@13.0.2", "https://registry.npmmirror.com/rehype/-/rehype-13.0.2.tgz", { "dependencies": { "@types/hast": "^3.0.0", "rehype-parse": "^9.0.0", "rehype-stringify": "^10.0.0", "unified": "^11.0.0" } }, "sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A=="],
|
|
825
823
|
|
|
826
|
-
"rehype-external-links": ["rehype-external-links@3.0.0", "https://registry.npmmirror.com/rehype-external-links/-/rehype-external-links-3.0.0.tgz", { "dependencies": { "@types/hast": "^3.0.0", "@ungap/structured-clone": "^1.0.0", "hast-util-is-element": "^3.0.0", "is-absolute-url": "^4.0.0", "space-separated-tokens": "^2.0.0", "unist-util-visit": "^5.0.0" } }, "sha512-yp+e5N9V3C6bwBeAC4n796kc86M4gJCdlVhiMTxIrJG5UHDMh+PJANf9heqORJbt1nrCbDwIlAZKjANIaVBbvw=="],
|
|
827
|
-
|
|
828
824
|
"rehype-parse": ["rehype-parse@9.0.1", "https://registry.npmmirror.com/rehype-parse/-/rehype-parse-9.0.1.tgz", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-from-html": "^2.0.0", "unified": "^11.0.0" } }, "sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag=="],
|
|
829
825
|
|
|
830
826
|
"rehype-raw": ["rehype-raw@7.0.0", "https://registry.npmmirror.com/rehype-raw/-/rehype-raw-7.0.0.tgz", { "dependencies": { "@types/hast": "^3.0.0", "hast-util-raw": "^9.0.0", "vfile": "^6.0.0" } }, "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww=="],
|
|
@@ -951,7 +947,7 @@
|
|
|
951
947
|
|
|
952
948
|
"unist-util-visit-parents": ["unist-util-visit-parents@6.0.1", "https://registry.npmmirror.com/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw=="],
|
|
953
949
|
|
|
954
|
-
"unocss": ["unocss@66.
|
|
950
|
+
"unocss": ["unocss@66.3.3", "https://registry.npmmirror.com/unocss/-/unocss-66.3.3.tgz", { "dependencies": { "@unocss/astro": "66.3.3", "@unocss/cli": "66.3.3", "@unocss/core": "66.3.3", "@unocss/postcss": "66.3.3", "@unocss/preset-attributify": "66.3.3", "@unocss/preset-icons": "66.3.3", "@unocss/preset-mini": "66.3.3", "@unocss/preset-tagify": "66.3.3", "@unocss/preset-typography": "66.3.3", "@unocss/preset-uno": "66.3.3", "@unocss/preset-web-fonts": "66.3.3", "@unocss/preset-wind": "66.3.3", "@unocss/preset-wind3": "66.3.3", "@unocss/preset-wind4": "66.3.3", "@unocss/transformer-attributify-jsx": "66.3.3", "@unocss/transformer-compile-class": "66.3.3", "@unocss/transformer-directives": "66.3.3", "@unocss/transformer-variant-group": "66.3.3", "@unocss/vite": "66.3.3" }, "peerDependencies": { "@unocss/webpack": "66.3.3", "vite": "^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 || ^7.0.0-0" }, "optionalPeers": ["@unocss/webpack", "vite"] }, "sha512-HSB+K4/EbouwYmxpPU52cg0exua7PUr2IAJZBV3iai6tPdMcJ0c8jXaw7G+2L+ffruVFTcS0e2kE4OrR8BKDLg=="],
|
|
955
951
|
|
|
956
952
|
"unplugin-utils": ["unplugin-utils@0.2.4", "https://registry.npmmirror.com/unplugin-utils/-/unplugin-utils-0.2.4.tgz", { "dependencies": { "pathe": "^2.0.2", "picomatch": "^4.0.2" } }, "sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA=="],
|
|
957
953
|
|
|
@@ -1009,6 +1005,8 @@
|
|
|
1009
1005
|
|
|
1010
1006
|
"@unocss/cli/chokidar": ["chokidar@3.6.0", "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="],
|
|
1011
1007
|
|
|
1008
|
+
"@unocss/postcss/postcss": ["postcss@8.5.6", "https://registry.npmmirror.com/postcss/-/postcss-8.5.6.tgz", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg=="],
|
|
1009
|
+
|
|
1012
1010
|
"@unocss/vite/chokidar": ["chokidar@3.6.0", "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="],
|
|
1013
1011
|
|
|
1014
1012
|
"@vue/compiler-core/estree-walker": ["estree-walker@2.0.2", "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
|
|
@@ -13,11 +13,16 @@ const [owner, repoName] = repo.split('/')
|
|
|
13
13
|
<a
|
|
14
14
|
href={`https://github.com/${repo}`}
|
|
15
15
|
target='_blank'
|
|
16
|
-
class='group block flex flex-col gap-y-
|
|
16
|
+
class='group block flex flex-col gap-y-1.5 rounded-xl border px-5 py-4 transition-colors hover:bg-muted hover:text-muted-foreground'
|
|
17
17
|
>
|
|
18
18
|
<div class='flex items-center justify-between'>
|
|
19
19
|
<div class='flex items-center gap-x-2 text-foreground group-hover:text-primary'>
|
|
20
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
id='gh-avatar'
|
|
22
|
+
class='gh-text me-2 size-7'
|
|
23
|
+
style='border-radius:999px;background-size:cover'
|
|
24
|
+
>
|
|
25
|
+
</div>
|
|
21
26
|
<span class='text-lg transition-colors'>{owner}</span>
|
|
22
27
|
<span class='text-muted-foreground'>/</span>
|
|
23
28
|
<span class='text-lg font-bold transition-colors'>{repoName}</span>
|
|
@@ -27,26 +32,26 @@ const [owner, repoName] = repo.split('/')
|
|
|
27
32
|
</div>
|
|
28
33
|
</div>
|
|
29
34
|
<p id='gh-description' class='gh-text'>Waiting for api.github.com...</p>
|
|
30
|
-
<div class='flex items-center justify-between'>
|
|
35
|
+
<div class='text-sm flex items-center justify-between mt-0.5'>
|
|
31
36
|
<div class='gh-text flex flex-wrap items-center gap-x-5'>
|
|
32
37
|
<div class='flex items-center gap-x-2'>
|
|
33
38
|
{/* mingcute:star-line */}
|
|
34
39
|
<!-- prettier-ignore -->
|
|
35
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
40
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M10.92 2.868a1.25 1.25 0 0 1 2.16 0l2.795 4.798l5.428 1.176a1.25 1.25 0 0 1 .667 2.054l-3.7 4.141l.56 5.525a1.25 1.25 0 0 1-1.748 1.27L12 19.592l-5.082 2.24a1.25 1.25 0 0 1-1.748-1.27l.56-5.525l-3.7-4.14a1.25 1.25 0 0 1 .667-2.055l5.428-1.176zM12 4.987L9.687 8.959a1.25 1.25 0 0 1-.816.592l-4.492.973l3.062 3.427c.234.262.347.61.312.959l-.463 4.573l4.206-1.854a1.25 1.25 0 0 1 1.008 0l4.206 1.854l-.463-4.573a1.25 1.25 0 0 1 .311-.959l3.063-3.427l-4.492-.973a1.25 1.25 0 0 1-.816-.592z"/></g></svg>
|
|
36
41
|
<span id='gh-stars' class='leading-tight'>???</span>
|
|
37
42
|
</div>
|
|
38
43
|
|
|
39
44
|
<div class='flex items-center gap-x-2'>
|
|
40
45
|
{/* mingcute:git-branch-line */}
|
|
41
46
|
<!-- prettier-ignore -->
|
|
42
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M18 3a3 3 0 0 1 1 5.83V9a4 4 0 0 1-4 4H9a2 2 0 0 0-2 2v.17a3.001 3.001 0 1 1-2 0V8.83a3.001 3.001 0 1 1 2 0v2.705A4 4 0 0 1 9 11h6a2 2 0 0 0 2-2v-.17A3.001 3.001 0 0 1 18 3M6 17a1 1 0 1 0 0 2a1 1 0 0 0 0-2M6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m12 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2"/></g></svg>
|
|
43
48
|
<span id='gh-forks' class='leading-tight'>???</span>
|
|
44
49
|
</div>
|
|
45
50
|
|
|
46
51
|
<div class='flex items-center gap-x-2'>
|
|
47
52
|
{/* mingcute:balance-line */}
|
|
48
53
|
<!-- prettier-ignore -->
|
|
49
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><g fill="none" fill-rule="evenodd"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"/><path fill="currentColor" d="M12 3a1 1 0 0 1 1 1v1h.764a2 2 0 0 1 .894.211L16.236 6H20a1 1 0 1 1 0 2h-.382l2.276 4.553c.07.139.106.292.106.447a4 4 0 0 1-8 0c0-.155.036-.308.106-.447L16.382 8h-.146a2 2 0 0 1-.894-.211L13.764 7H13v12h3a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h3V7h-.764l-1.578.789A2 2 0 0 1 7.764 8h-.146l2.276 4.553A1 1 0 0 1 10 13a4 4 0 0 1-8 0a1 1 0 0 1 .106-.447L4.382 8H4a1 1 0 0 1 0-2h3.764l1.578-.789A2 2 0 0 1 10.236 5H11V4a1 1 0 0 1 1-1M6 9.236l-1.989 3.977a2 2 0 0 0 3.978 0zm12 0l-1.989 3.977a2 2 0 0 0 3.955.157l.023-.156z"/></g></svg>
|
|
50
55
|
<span id='gh-license' class='leading-tight'>???</span>
|
|
51
56
|
</div>
|
|
52
57
|
</div>
|
|
@@ -3,7 +3,6 @@ import config from 'virtual:config'
|
|
|
3
3
|
|
|
4
4
|
import { Icon } from '../user'
|
|
5
5
|
|
|
6
|
-
const year = new Date().getFullYear()
|
|
7
6
|
const footerConf = config.footer
|
|
8
7
|
let social = footerConf.social || {}
|
|
9
8
|
|
|
@@ -39,7 +38,7 @@ const footerLink1 = footerConf.links?.filter(({ pos }) => pos === 1) || []
|
|
|
39
38
|
}
|
|
40
39
|
{/* Position 2 */}
|
|
41
40
|
<div>
|
|
42
|
-
|
|
41
|
+
{config.footer.year}
|
|
43
42
|
{config.author}
|
|
44
43
|
{
|
|
45
44
|
footerConf.links && footerConf.links.length > 0 && (
|
|
@@ -5,7 +5,7 @@ import { Icon } from '../user'
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<header-component
|
|
8
|
-
class='group sticky top-4 z-30 mb-12 flex items-center justify-between rounded-xl border border-transparent max-sm:py-1 sm:rounded-2xl'
|
|
8
|
+
class='group sticky top-4 z-30 md:z-50 mb-12 flex items-center justify-between rounded-xl border border-transparent max-sm:py-1 sm:rounded-2xl'
|
|
9
9
|
>
|
|
10
10
|
<a
|
|
11
11
|
class='z-30 text-xl font-semibold group-[.not-top]:ms-2 sm:group-[.not-top]:ms-3'
|
|
@@ -119,7 +119,7 @@ const postDate = data.updatedDate ?? data.publishDate
|
|
|
119
119
|
<ul class='tag-list mt-1 flex flex-wrap gap-2'>
|
|
120
120
|
{data.tags.map((tag: string) => (
|
|
121
121
|
<li>
|
|
122
|
-
<Button title={tag} href={`/tags/${tag}`}
|
|
122
|
+
<Button title={tag} href={`/tags/${tag}`} variant='pill' />
|
|
123
123
|
</li>
|
|
124
124
|
))}
|
|
125
125
|
</ul>
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { cn } from '../../utils'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
interface Props {
|
|
5
|
+
as?: string
|
|
6
|
+
title?: string
|
|
7
|
+
href?: string
|
|
8
|
+
variant?: 'button' | 'pill' | 'back' | 'ahead'
|
|
9
|
+
class?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { as: Tag = 'a', class: className, title, href, variant = 'button', ...props } = Astro.props
|
|
5
13
|
---
|
|
6
14
|
|
|
7
15
|
<Tag
|
|
8
16
|
class={cn(
|
|
9
17
|
'group inline-flex items-center gap-x-1 rounded-lg bg-muted border px-2 py-1 text-sm text-muted-foreground transition-all hover:bg-primary-foreground no-underline',
|
|
10
18
|
!href && 'cursor-default',
|
|
11
|
-
|
|
19
|
+
variant === 'pill' && 'rounded-xl',
|
|
12
20
|
className
|
|
13
21
|
)}
|
|
14
22
|
href={href}
|
|
@@ -17,7 +25,7 @@ const { as: Tag = 'a', class: className, title, href, style = 'button', ...props
|
|
|
17
25
|
>
|
|
18
26
|
<slot name='before'>
|
|
19
27
|
{
|
|
20
|
-
|
|
28
|
+
variant === 'back' && (
|
|
21
29
|
<svg
|
|
22
30
|
xmlns='http://www.w3.org/2000/svg'
|
|
23
31
|
width='16'
|
|
@@ -49,7 +57,7 @@ const { as: Tag = 'a', class: className, title, href, style = 'button', ...props
|
|
|
49
57
|
</slot>
|
|
50
58
|
<slot name='after'>
|
|
51
59
|
{
|
|
52
|
-
|
|
60
|
+
variant === 'ahead' && (
|
|
53
61
|
<svg
|
|
54
62
|
xmlns='http://www.w3.org/2000/svg'
|
|
55
63
|
width='16'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-pure",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "A simple, clean but powerful blog theme build by astro.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "CWorld",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@astrojs/mdx": "^4.3.0",
|
|
39
|
-
"@astrojs/sitemap": "^3.4.
|
|
39
|
+
"@astrojs/sitemap": "^3.4.1",
|
|
40
40
|
"@pagefind/default-ui": "^1.3.0",
|
|
41
|
-
"
|
|
41
|
+
"@unocss/reset": "^66.3.3",
|
|
42
|
+
"astro": "^5.11.1",
|
|
42
43
|
"hast-util-select": "^6.0.4",
|
|
43
44
|
"node-html-parser": "^7.0.1",
|
|
44
45
|
"pagefind": "^1.3.0",
|
|
45
|
-
"
|
|
46
|
-
"unocss": "^66.1.3"
|
|
46
|
+
"unocss": "^66.3.3"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -29,7 +29,11 @@ export const IntegrationConfigSchema = () =>
|
|
|
29
29
|
/** The class to apply to the typography. */
|
|
30
30
|
class: z
|
|
31
31
|
.string()
|
|
32
|
-
.default('prose prose-pure dark:prose-invert dark:prose-pure prose-headings:font-medium')
|
|
32
|
+
.default('prose prose-pure dark:prose-invert dark:prose-pure prose-headings:font-medium'),
|
|
33
|
+
/** The style of blockquote font, normal or italic. */
|
|
34
|
+
blockquoteStyle: z.enum(['normal', 'italic']).default('italic'),
|
|
35
|
+
/** The style of inline code block, code or modern. */
|
|
36
|
+
inlineCodeBlockStyle: z.enum(['code', 'modern']).default('modern')
|
|
33
37
|
}),
|
|
34
38
|
|
|
35
39
|
/** A lightbox library that can add zoom effect */
|
package/types/theme-config.ts
CHANGED
|
@@ -119,6 +119,8 @@ export const ThemeConfigSchema = () =>
|
|
|
119
119
|
|
|
120
120
|
/** Configure the footer of your site. */
|
|
121
121
|
footer: z.object({
|
|
122
|
+
/** The footer content for your site. */
|
|
123
|
+
year: z.string().describe('The footer content for your site.'),
|
|
122
124
|
/** The footer links for your site. */
|
|
123
125
|
links: z
|
|
124
126
|
.array(
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// https://github.com/rehypejs/rehype-external-links
|
|
2
|
+
|
|
3
|
+
import type { Element, ElementContent, Root } from 'hast'
|
|
4
|
+
import isAbsoluteUrl from 'is-absolute-url'
|
|
5
|
+
import { visit } from 'unist-util-visit'
|
|
6
|
+
|
|
7
|
+
export interface ExternalLinkOptions {
|
|
8
|
+
content?: ElementContent | ElementContent[]
|
|
9
|
+
contentProperties?: Record<string, unknown>
|
|
10
|
+
protocols?: string[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const defaultProtocols = ['http', 'https']
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Automatically add `rel` (and `target`?) to external links.
|
|
17
|
+
*
|
|
18
|
+
* ###### Notes
|
|
19
|
+
*
|
|
20
|
+
* You should [likely not configure `target`][css-tricks].
|
|
21
|
+
*
|
|
22
|
+
* You should at least set `rel` to `['nofollow']`.
|
|
23
|
+
* When using a `target`, add `noopener` and `noreferrer` to avoid exploitation
|
|
24
|
+
* of the `window.opener` API.
|
|
25
|
+
*
|
|
26
|
+
* When using a `target`, you should set `content` to adhere to accessibility
|
|
27
|
+
* guidelines by giving users advanced warning when opening a new window.
|
|
28
|
+
*
|
|
29
|
+
* [css-tricks]: https://css-tricks.com/use-target_blank/
|
|
30
|
+
*
|
|
31
|
+
* @param {Readonly<Options> | null | undefined} [options]
|
|
32
|
+
* Configuration (optional).
|
|
33
|
+
* @returns
|
|
34
|
+
* Transform.
|
|
35
|
+
*/
|
|
36
|
+
export default function rehypeExternalLinks(options: ExternalLinkOptions = {}) {
|
|
37
|
+
const { content, contentProperties = {}, protocols = defaultProtocols } = options
|
|
38
|
+
|
|
39
|
+
return function transformer(tree: Root): void {
|
|
40
|
+
visit(tree, 'element', (node: Element) => {
|
|
41
|
+
if (node.tagName === 'a' && typeof node.properties?.href === 'string') {
|
|
42
|
+
const href = node.properties.href
|
|
43
|
+
const protocol = href.startsWith('//')
|
|
44
|
+
? 'http' // treat protocol-relative as http
|
|
45
|
+
: href.slice(0, href.indexOf(':'))
|
|
46
|
+
|
|
47
|
+
if (href.startsWith('//') || (isAbsoluteUrl(href) && protocols.includes(protocol))) {
|
|
48
|
+
node.properties = {
|
|
49
|
+
...node.properties,
|
|
50
|
+
rel: 'nofollow noopener noreferrer',
|
|
51
|
+
target: '_blank'
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (content) {
|
|
55
|
+
const spanNode: Element = {
|
|
56
|
+
type: 'element',
|
|
57
|
+
tagName: 'span',
|
|
58
|
+
properties: {
|
|
59
|
+
...(contentProperties as Record<
|
|
60
|
+
string,
|
|
61
|
+
string | number | boolean | (string | number)[] | null | undefined
|
|
62
|
+
>)
|
|
63
|
+
},
|
|
64
|
+
children: Array.isArray(content) ? content : [content]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
node.children.push(spanNode)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
}
|