robots plugin, setup shiki
This commit is contained in:
@@ -10,6 +10,10 @@ import mdx from "@astrojs/mdx";
|
||||
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
|
||||
import robotsTxt from "astro-robots-txt";
|
||||
|
||||
import { transformerMetaHighlight } from "@shikijs/transformers";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
vite: {
|
||||
@@ -26,7 +30,25 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
|
||||
integrations: [icon(), mdx(), sitemap()],
|
||||
integrations: [icon(), mdx(), sitemap(), robotsTxt()],
|
||||
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
transformers: [
|
||||
transformerMetaHighlight(),
|
||||
{
|
||||
pre(hast) {
|
||||
hast.properties["data-meta"] = this.options.meta?.__raw;
|
||||
hast.properties["data-code"] = this.source;
|
||||
}
|
||||
}
|
||||
],
|
||||
themes: {
|
||||
light: "github-light",
|
||||
dark: "github-dark"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
site: "https://www.nathancummins.com.au",
|
||||
|
||||
|
50
package-lock.json
generated
50
package-lock.json
generated
@@ -18,6 +18,7 @@
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"astro": "^5.12.8",
|
||||
"astro-icon": "^1.1.5",
|
||||
"astro-robots-txt": "^1.0.0",
|
||||
"astro-seo-schema": "^5.1.0",
|
||||
"get-audio-duration": "^4.0.1",
|
||||
"schema-dts": "^1.1.5",
|
||||
@@ -25,6 +26,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cspell/dict-en-au": "^1.1.4",
|
||||
"@shikijs/transformers": "^3.9.2",
|
||||
"@types/howler": "^2.2.12",
|
||||
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||
"@typescript-eslint/parser": "^8.38.0",
|
||||
@@ -2122,6 +2124,17 @@
|
||||
"@shikijs/types": "3.9.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/transformers": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-3.9.2.tgz",
|
||||
"integrity": "sha512-MW5hT4TyUp6bNAgTExRYLk1NNasVQMTCw1kgbxHcEC0O5cbepPWaB+1k+JzW9r3SP2/R8kiens8/3E6hGKfgsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@shikijs/core": "3.9.2",
|
||||
"@shikijs/types": "3.9.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@shikijs/types": {
|
||||
"version": "3.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.9.2.tgz",
|
||||
@@ -3115,6 +3128,16 @@
|
||||
"@iconify/utils": "^2.1.30"
|
||||
}
|
||||
},
|
||||
"node_modules/astro-robots-txt": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/astro-robots-txt/-/astro-robots-txt-1.0.0.tgz",
|
||||
"integrity": "sha512-6JQSLid4gMhoWjOm85UHLkgrw0+hHIjnJVIUqxjU2D6feKlVyYukMNYjH44ZDZBK1P8hNxd33PgWlHzCASvedA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"valid-filename": "^4.0.0",
|
||||
"zod": "^3.22.2"
|
||||
}
|
||||
},
|
||||
"node_modules/astro-seo-schema": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/astro-seo-schema/-/astro-seo-schema-5.1.0.tgz",
|
||||
@@ -4768,6 +4791,18 @@
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/filename-reserved-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-3.0.0.tgz",
|
||||
"integrity": "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
@@ -9361,6 +9396,21 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/valid-filename": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/valid-filename/-/valid-filename-4.0.0.tgz",
|
||||
"integrity": "sha512-VEYTpTVPMgO799f2wI7zWf0x2C54bPX6NAfbZ2Z8kZn76p+3rEYCTYVYzMUcVSMvakxMQTriBf24s3+WeXJtEg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"filename-reserved-regex": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/vfile": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
|
||||
|
@@ -19,6 +19,7 @@
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"astro": "^5.12.8",
|
||||
"astro-icon": "^1.1.5",
|
||||
"astro-robots-txt": "^1.0.0",
|
||||
"astro-seo-schema": "^5.1.0",
|
||||
"get-audio-duration": "^4.0.1",
|
||||
"schema-dts": "^1.1.5",
|
||||
@@ -26,6 +27,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cspell/dict-en-au": "^1.1.4",
|
||||
"@shikijs/transformers": "^3.9.2",
|
||||
"@types/howler": "^2.2.12",
|
||||
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||
"@typescript-eslint/parser": "^8.38.0",
|
||||
|
Reference in New Issue
Block a user