Compare commits
No commits in common. "57070d3229362289780641e7deb100e0c2d9792c" and "8b7cafcaf128f5e6c8d0d0f216b26fa616fd7f9e" have entirely different histories.
57070d3229
...
8b7cafcaf1
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -81,7 +81,6 @@
|
|||||||
"luoli",
|
"luoli",
|
||||||
"luxon",
|
"luxon",
|
||||||
"mboker",
|
"mboker",
|
||||||
"microflash",
|
|
||||||
"minagi",
|
"minagi",
|
||||||
"miui",
|
"miui",
|
||||||
"mmwebid",
|
"mmwebid",
|
||||||
|
@ -2,9 +2,7 @@ import mdx from '@astrojs/mdx';
|
|||||||
import zeabur from '@zeabur/astro-adapter/serverless';
|
import zeabur from '@zeabur/astro-adapter/serverless';
|
||||||
import { uploader } from 'astro-uploader';
|
import { uploader } from 'astro-uploader';
|
||||||
import { defineConfig, envField } from 'astro/config';
|
import { defineConfig, envField } from 'astro/config';
|
||||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
|
|
||||||
import rehypeExternalLinks from 'rehype-external-links';
|
import rehypeExternalLinks from 'rehype-external-links';
|
||||||
import rehypeSlug from 'rehype-slug';
|
|
||||||
import options from './options';
|
import options from './options';
|
||||||
import { astroImage } from './plugins/images';
|
import { astroImage } from './plugins/images';
|
||||||
|
|
||||||
@ -40,11 +38,7 @@ export default defineConfig({
|
|||||||
integrations: [
|
integrations: [
|
||||||
mdx({
|
mdx({
|
||||||
remarkPlugins: [astroImage],
|
remarkPlugins: [astroImage],
|
||||||
rehypePlugins: [
|
rehypePlugins: [[rehypeExternalLinks, { rel: 'nofollow', target: '_blank' }]],
|
||||||
[rehypeExternalLinks, { rel: 'nofollow', target: '_blank' }],
|
|
||||||
rehypeSlug,
|
|
||||||
[rehypeAutolinkHeadings, { behavior: 'append', properties: {} }],
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
uploader({
|
uploader({
|
||||||
paths: ['images', 'og', 'cats'],
|
paths: ['images', 'og', 'cats'],
|
||||||
|
157
package-lock.json
generated
157
package-lock.json
generated
@ -28,7 +28,7 @@
|
|||||||
"@napi-rs/canvas": "^0.1.56",
|
"@napi-rs/canvas": "^0.1.56",
|
||||||
"@types/lodash": "^4.17.9",
|
"@types/lodash": "^4.17.9",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
"@types/node": "^22.7.2",
|
"@types/node": "^22.6.1",
|
||||||
"@types/pg": "^8.11.10",
|
"@types/pg": "^8.11.10",
|
||||||
"@types/qrcode-svg": "^1.1.5",
|
"@types/qrcode-svg": "^1.1.5",
|
||||||
"@types/unist": "^3.0.3",
|
"@types/unist": "^3.0.3",
|
||||||
@ -39,9 +39,7 @@
|
|||||||
"prettier-plugin-astro": "^0.14.1",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
"prettier-plugin-organize-imports": "^4.1.0",
|
||||||
"rehype-autolink-headings": "^7.1.0",
|
|
||||||
"rehype-external-links": "^3.0.0",
|
"rehype-external-links": "^3.0.0",
|
||||||
"rehype-slug": "^6.0.0",
|
|
||||||
"resize-sensor": "^0.0.6",
|
"resize-sensor": "^0.0.6",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
@ -2292,44 +2290,44 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/@shikijs/core": {
|
"node_modules/@shikijs/core": {
|
||||||
"version": "1.19.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.18.0.tgz",
|
||||||
"integrity": "sha512-314J5MPdS1wzfjuD856MXvbAI2wN03ofMnUGkZ5ZDBOza/d38paLwd+YVyuKrrjxJ4hfPMjc4tRmPkXd6UDMPQ==",
|
"integrity": "sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/engine-javascript": "1.19.0",
|
"@shikijs/engine-javascript": "1.18.0",
|
||||||
"@shikijs/engine-oniguruma": "1.19.0",
|
"@shikijs/engine-oniguruma": "1.18.0",
|
||||||
"@shikijs/types": "1.19.0",
|
"@shikijs/types": "1.18.0",
|
||||||
"@shikijs/vscode-textmate": "^9.2.2",
|
"@shikijs/vscode-textmate": "^9.2.2",
|
||||||
"@types/hast": "^3.0.4",
|
"@types/hast": "^3.0.4",
|
||||||
"hast-util-to-html": "^9.0.3"
|
"hast-util-to-html": "^9.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@shikijs/engine-javascript": {
|
"node_modules/@shikijs/engine-javascript": {
|
||||||
"version": "1.19.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.18.0.tgz",
|
||||||
"integrity": "sha512-D1sioU61n7fLWfDzTC9JNS19zEYZMr7qxkSVzv6ziEWDxnwzy2PvYoKPedJV4qUf+2VnrYPSaArDz2W0XgGB7A==",
|
"integrity": "sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/types": "1.19.0",
|
"@shikijs/types": "1.18.0",
|
||||||
"@shikijs/vscode-textmate": "^9.2.2",
|
"@shikijs/vscode-textmate": "^9.2.2",
|
||||||
"oniguruma-to-js": "0.4.3"
|
"oniguruma-to-js": "0.4.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@shikijs/engine-oniguruma": {
|
"node_modules/@shikijs/engine-oniguruma": {
|
||||||
"version": "1.19.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.18.0.tgz",
|
||||||
"integrity": "sha512-/JxwIefNVLGB4EmpB8i6P4JB/oVYRuzSixbqvx7m6iPW0lQ1T97c/0wmA+JlKbngEiExckSuPwa48fajlShB7A==",
|
"integrity": "sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/types": "1.19.0",
|
"@shikijs/types": "1.18.0",
|
||||||
"@shikijs/vscode-textmate": "^9.2.2"
|
"@shikijs/vscode-textmate": "^9.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@shikijs/types": {
|
"node_modules/@shikijs/types": {
|
||||||
"version": "1.19.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.18.0.tgz",
|
||||||
"integrity": "sha512-NZvVp3k1bP4MTRUbmnkGhYzPdoNMjNLSAwczMRUbtUl4oj2LlNRNbwERyeIyJt56Ac9fvPVZ2nn13OXk86E5UQ==",
|
"integrity": "sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/vscode-textmate": "^9.2.2",
|
"@shikijs/vscode-textmate": "^9.2.2",
|
||||||
@ -2476,9 +2474,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.7.2",
|
"version": "22.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz",
|
||||||
"integrity": "sha512-866lXSrpGpgyHBZUa2m9YNWqHDjjM0aBTJlNtYaGEw4rqY/dcD7deRVTbBBAJelfA7oaGDbNftXF/TL/A6RgoA==",
|
"integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==",
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -3259,9 +3257,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/browserslist": {
|
"node_modules/browserslist": {
|
||||||
"version": "4.24.0",
|
"version": "4.23.3",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz",
|
||||||
"integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==",
|
"integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -3278,8 +3276,8 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"caniuse-lite": "^1.0.30001663",
|
"caniuse-lite": "^1.0.30001646",
|
||||||
"electron-to-chromium": "^1.5.28",
|
"electron-to-chromium": "^1.5.4",
|
||||||
"node-releases": "^2.0.18",
|
"node-releases": "^2.0.18",
|
||||||
"update-browserslist-db": "^1.1.0"
|
"update-browserslist-db": "^1.1.0"
|
||||||
},
|
},
|
||||||
@ -3303,9 +3301,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001664",
|
"version": "1.0.30001663",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz",
|
||||||
"integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==",
|
"integrity": "sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@ -3830,9 +3828,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/devalue": {
|
"node_modules/devalue": {
|
||||||
"version": "5.1.1",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/devalue/-/devalue-5.0.0.tgz",
|
||||||
"integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==",
|
"integrity": "sha512-gO+/OMXF7488D+u3ue+G7Y4AA3ZmUnB3eHJXmBTgNHvr4ZNzl36A0ZtG+XCRNYCkYx/bFmw4qtkoFLa+wSrwAA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/devlop": {
|
"node_modules/devlop": {
|
||||||
@ -4000,9 +3998,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.5.29",
|
"version": "1.5.28",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.28.tgz",
|
||||||
"integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==",
|
"integrity": "sha512-VufdJl+rzaKZoYVUijN13QcXVF5dWPZANeFTLNy+OSpHdDL5ynXTF35+60RSBbaQYB1ae723lQXHCrf4pyLsMw==",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
"node_modules/emmet": {
|
"node_modules/emmet": {
|
||||||
@ -4665,20 +4663,6 @@
|
|||||||
"url": "https://opencollective.com/unified"
|
"url": "https://opencollective.com/unified"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hast-util-heading-rank": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/hast-util-heading-rank/-/hast-util-heading-rank-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/hast": "^3.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/unified"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/hast-util-is-element": {
|
"node_modules/hast-util-is-element": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
|
||||||
@ -4842,20 +4826,6 @@
|
|||||||
"url": "https://opencollective.com/unified"
|
"url": "https://opencollective.com/unified"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hast-util-to-string": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.0.tgz",
|
|
||||||
"integrity": "sha512-OGkAxX1Ua3cbcW6EJ5pT/tslVb90uViVkcJ4ZZIMW/R33DX/AkcJcRrPebPwJkHYwlDHXz4aIwvAAaAdtrACFA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/hast": "^3.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/unified"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/hast-util-to-text": {
|
"node_modules/hast-util-to-text": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
|
||||||
@ -7586,25 +7556,6 @@
|
|||||||
"url": "https://opencollective.com/unified"
|
"url": "https://opencollective.com/unified"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rehype-autolink-headings": {
|
|
||||||
"version": "7.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/rehype-autolink-headings/-/rehype-autolink-headings-7.1.0.tgz",
|
|
||||||
"integrity": "sha512-rItO/pSdvnvsP4QRB1pmPiNHUskikqtPojZKJPPPAVx9Hj8i8TwMBhofrrAYRhYOOBZH9tgmG5lPqDLuIWPWmw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/hast": "^3.0.0",
|
|
||||||
"@ungap/structured-clone": "^1.0.0",
|
|
||||||
"hast-util-heading-rank": "^3.0.0",
|
|
||||||
"hast-util-is-element": "^3.0.0",
|
|
||||||
"unified": "^11.0.0",
|
|
||||||
"unist-util-visit": "^5.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/unified"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/rehype-external-links": {
|
"node_modules/rehype-external-links": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/rehype-external-links/-/rehype-external-links-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/rehype-external-links/-/rehype-external-links-3.0.0.tgz",
|
||||||
@ -7654,24 +7605,6 @@
|
|||||||
"url": "https://opencollective.com/unified"
|
"url": "https://opencollective.com/unified"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rehype-slug": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/rehype-slug/-/rehype-slug-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/hast": "^3.0.0",
|
|
||||||
"github-slugger": "^2.0.0",
|
|
||||||
"hast-util-heading-rank": "^3.0.0",
|
|
||||||
"hast-util-to-string": "^3.0.0",
|
|
||||||
"unist-util-visit": "^5.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "opencollective",
|
|
||||||
"url": "https://opencollective.com/unified"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/rehype-stringify": {
|
"node_modules/rehype-stringify": {
|
||||||
"version": "10.0.0",
|
"version": "10.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-10.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/rehype-stringify/-/rehype-stringify-10.0.0.tgz",
|
||||||
@ -8248,15 +8181,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/shiki": {
|
"node_modules/shiki": {
|
||||||
"version": "1.19.0",
|
"version": "1.18.0",
|
||||||
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.18.0.tgz",
|
||||||
"integrity": "sha512-Ng7Gd6XgWFLsv4Z3so65hOyXjV78qz1M117MuZHwdPQD6fgb5wR2IoLMvSlM/Ml14EXH7n+/YxIpTD74i7kDdw==",
|
"integrity": "sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@shikijs/core": "1.19.0",
|
"@shikijs/core": "1.18.0",
|
||||||
"@shikijs/engine-javascript": "1.19.0",
|
"@shikijs/engine-javascript": "1.18.0",
|
||||||
"@shikijs/engine-oniguruma": "1.19.0",
|
"@shikijs/engine-oniguruma": "1.18.0",
|
||||||
"@shikijs/types": "1.19.0",
|
"@shikijs/types": "1.18.0",
|
||||||
"@shikijs/vscode-textmate": "^9.2.2",
|
"@shikijs/vscode-textmate": "^9.2.2",
|
||||||
"@types/hast": "^3.0.4"
|
"@types/hast": "^3.0.4"
|
||||||
}
|
}
|
||||||
@ -8936,9 +8869,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "5.4.8",
|
"version": "5.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.8.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz",
|
||||||
"integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==",
|
"integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.21.3",
|
"esbuild": "^0.21.3",
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
"@napi-rs/canvas": "^0.1.56",
|
"@napi-rs/canvas": "^0.1.56",
|
||||||
"@types/lodash": "^4.17.9",
|
"@types/lodash": "^4.17.9",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
"@types/node": "^22.7.2",
|
"@types/node": "^22.6.1",
|
||||||
"@types/pg": "^8.11.10",
|
"@types/pg": "^8.11.10",
|
||||||
"@types/qrcode-svg": "^1.1.5",
|
"@types/qrcode-svg": "^1.1.5",
|
||||||
"@types/unist": "^3.0.3",
|
"@types/unist": "^3.0.3",
|
||||||
@ -72,9 +72,7 @@
|
|||||||
"prettier-plugin-astro": "^0.14.1",
|
"prettier-plugin-astro": "^0.14.1",
|
||||||
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
"prettier-plugin-astro-organize-imports": "^0.4.9",
|
||||||
"prettier-plugin-organize-imports": "^4.1.0",
|
"prettier-plugin-organize-imports": "^4.1.0",
|
||||||
"rehype-autolink-headings": "^7.1.0",
|
|
||||||
"rehype-external-links": "^3.0.0",
|
"rehype-external-links": "^3.0.0",
|
||||||
"rehype-slug": "^6.0.0",
|
|
||||||
"resize-sensor": "^0.0.6",
|
"resize-sensor": "^0.0.6",
|
||||||
"rimraf": "^6.0.1",
|
"rimraf": "^6.0.1",
|
||||||
"sharp": "^0.33.5",
|
"sharp": "^0.33.5",
|
||||||
|
@ -242,14 +242,14 @@ if (typeof comments !== 'undefined' && comments !== null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const scrollIntoView = (elem) => {
|
const scrollIntoView = (elem) => {
|
||||||
if (elem === undefined || elem === null) {
|
let top = 0;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const rect = elem.getBoundingClientRect();
|
const rect = elem.getBoundingClientRect();
|
||||||
const elemTop = rect.top + window.scrollY;
|
const elemTop = rect.top + window.scrollY;
|
||||||
|
top = elemTop - (window.innerHeight / 2 - rect.height / 2);
|
||||||
|
|
||||||
const scrollOptions = {
|
const scrollOptions = {
|
||||||
top: elemTop,
|
top,
|
||||||
left: 0,
|
left: 0,
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
};
|
};
|
||||||
@ -258,7 +258,7 @@ const scrollIntoView = (elem) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Highlighting the selected comment.
|
// Highlighting the selected comment.
|
||||||
const focusContent = () => {
|
const focusComment = () => {
|
||||||
if (location.hash.startsWith('#atk-comment-')) {
|
if (location.hash.startsWith('#atk-comment-')) {
|
||||||
for (const li of document.querySelectorAll('.comment-body')) {
|
for (const li of document.querySelectorAll('.comment-body')) {
|
||||||
li.classList.remove('active');
|
li.classList.remove('active');
|
||||||
@ -269,25 +269,10 @@ const focusContent = () => {
|
|||||||
scrollIntoView(li);
|
scrollIntoView(li);
|
||||||
li.querySelector('.comment-body').classList.add('active');
|
li.querySelector('.comment-body').classList.add('active');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// Try to find the ID on heading
|
|
||||||
if (location.hash.startsWith('#')) {
|
|
||||||
scrollIntoView(document.getElementById(decodeURIComponent(location.hash).substring(1)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
window.addEventListener('hashchange', focusComment);
|
||||||
window.addEventListener('load', focusContent);
|
window.addEventListener('load', focusComment);
|
||||||
|
|
||||||
// TOC Support
|
|
||||||
for (const anchor of document.querySelectorAll('a[href^="#"]')) {
|
|
||||||
anchor.addEventListener('click', (e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
const href = anchor.getAttribute('href');
|
|
||||||
location.hash = `${href}`;
|
|
||||||
scrollIntoView(document.querySelector(anchor.getAttribute('href')));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add like button for updating likes.
|
// Add like button for updating likes.
|
||||||
const likeButton = document.querySelector('button.post-like');
|
const likeButton = document.querySelector('button.post-like');
|
||||||
|
@ -2427,26 +2427,6 @@ a:hover .overlay {
|
|||||||
margin: 2rem 0 2rem;
|
margin: 2rem 0 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-content h1 a,
|
|
||||||
.post-content h2 a,
|
|
||||||
.post-content h3 a,
|
|
||||||
.post-content h4 a,
|
|
||||||
.post-content h5 a,
|
|
||||||
.post-content h6 a {
|
|
||||||
margin-left: 0.8rem;
|
|
||||||
text-decoration: none;
|
|
||||||
color: var(--color-muted);
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-content h1 a:hover,
|
|
||||||
.post-content h2 a:hover,
|
|
||||||
.post-content h3 a:hover,
|
|
||||||
.post-content h4 a:hover,
|
|
||||||
.post-content h5 a:hover,
|
|
||||||
.post-content h6 a:hover {
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-content h2 {
|
.post-content h2 {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 0 0 1.5rem;
|
padding: 0 0 0 1.5rem;
|
||||||
@ -2531,6 +2511,12 @@ a:hover .overlay {
|
|||||||
.post-content dd > a,
|
.post-content dd > a,
|
||||||
.post-content td a,
|
.post-content td a,
|
||||||
.post-content th a,
|
.post-content th a,
|
||||||
|
.post-content h1 a,
|
||||||
|
.post-content h2 a,
|
||||||
|
.post-content h3 a,
|
||||||
|
.post-content h4 a,
|
||||||
|
.post-content h5 a,
|
||||||
|
.post-content h6 a,
|
||||||
.post-content em a,
|
.post-content em a,
|
||||||
.post-content strong a {
|
.post-content strong a {
|
||||||
-webkit-box-shadow: 0 -1px 0 0 var(--color-primary) inset;
|
-webkit-box-shadow: 0 -1px 0 0 var(--color-primary) inset;
|
||||||
@ -2545,6 +2531,12 @@ a:hover .overlay {
|
|||||||
.post-content dd > a:hover,
|
.post-content dd > a:hover,
|
||||||
.post-content td a:hover,
|
.post-content td a:hover,
|
||||||
.post-content th a:hover,
|
.post-content th a:hover,
|
||||||
|
.post-content h1 a:hover,
|
||||||
|
.post-content h2 a:hover,
|
||||||
|
.post-content h3 a:hover,
|
||||||
|
.post-content h4 a:hover,
|
||||||
|
.post-content h5 a:hover,
|
||||||
|
.post-content h6 a:hover,
|
||||||
.post-content em a:hover,
|
.post-content em a:hover,
|
||||||
.post-content strong a:hover {
|
.post-content strong a:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
@ -6,8 +6,7 @@
|
|||||||
url('iconfont.ttf?t=1629473213677') format('truetype');
|
url('iconfont.ttf?t=1629473213677') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont,
|
.iconfont {
|
||||||
.icon {
|
|
||||||
font-family: 'iconfont' !important;
|
font-family: 'iconfont' !important;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
@ -20,7 +20,7 @@ const image = (fallbackImage: string) =>
|
|||||||
.string()
|
.string()
|
||||||
.optional()
|
.optional()
|
||||||
.default(fallbackImage)
|
.default(fallbackImage)
|
||||||
.transform((file) => imageMetadata(file));
|
.transform(async (arg) => await imageMetadata(arg));
|
||||||
|
|
||||||
// Categories Collection
|
// Categories Collection
|
||||||
const categoriesCollection = defineCollection({
|
const categoriesCollection = defineCollection({
|
||||||
|
@ -10,10 +10,7 @@ const postsCollection = await getCollection('posts');
|
|||||||
const tagsCollection = await getCollection('tags');
|
const tagsCollection = await getCollection('tags');
|
||||||
|
|
||||||
// Redefine the types from the astro content.
|
// Redefine the types from the astro content.
|
||||||
export type Category = (typeof categoriesCollection)[number]['data'] & {
|
export type Category = (typeof categoriesCollection)[number]['data'] & { counts: number; permalink: string };
|
||||||
counts: number;
|
|
||||||
permalink: string;
|
|
||||||
};
|
|
||||||
export type Friend = (typeof friendsCollection)[number]['data'][number];
|
export type Friend = (typeof friendsCollection)[number]['data'][number];
|
||||||
export type Page = (typeof pagesCollection)[number]['data'] & {
|
export type Page = (typeof pagesCollection)[number]['data'] & {
|
||||||
slug: string;
|
slug: string;
|
||||||
@ -62,7 +59,7 @@ export const posts: Post[] = postsCollection
|
|||||||
const b = right.date.getTime();
|
const b = right.date.getTime();
|
||||||
return options.settings.post.sort === 'asc' ? a - b : b - a;
|
return options.settings.post.sort === 'asc' ? a - b : b - a;
|
||||||
});
|
});
|
||||||
export const categories: Category[] = categoriesCollection.map(async (cat) => ({
|
export const categories: Category[] = categoriesCollection.map((cat) => ({
|
||||||
counts: posts.filter((post) => post.category === cat.data.name).length,
|
counts: posts.filter((post) => post.category === cat.data.name).length,
|
||||||
permalink: `/cats/${cat.data.slug}`,
|
permalink: `/cats/${cat.data.slug}`,
|
||||||
...cat.data,
|
...cat.data,
|
||||||
|
Loading…
Reference in New Issue
Block a user