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",
|
||||
|
||||
|
Reference in New Issue
Block a user