mdx extensions, rehype :)
This commit is contained in:
parent
c4782396f4
commit
194c3a9a16
File diff suppressed because one or more lines are too long
@ -24,6 +24,7 @@ export function remarkReadingTime() {
|
||||
|
||||
/**
|
||||
* @link : https://github.com/rehypejs/rehype/blob/main/doc/plugins.md
|
||||
* @link : https://tanggd.github.io/en/guides/markdown-content/#configuring-markdown-and-mdx
|
||||
*/
|
||||
|
||||
export default defineConfig({
|
||||
@ -57,7 +58,7 @@ export default defineConfig({
|
||||
name: 'auto-import-img',
|
||||
transform(code, id) {
|
||||
if (id.endsWith('.astro') || id.endsWith('.mdx')) {
|
||||
return `import { Img } from 'imagetools/components';\n` + code;
|
||||
// return `import { Img } from 'imagetools/components';\n` + code;
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -93,14 +94,7 @@ export default defineConfig({
|
||||
mdx({
|
||||
rehypePlugins: [
|
||||
rehypeAccessibleEmojis,
|
||||
remarkReadingTime,
|
||||
toc,
|
||||
() => {
|
||||
// All remark and rehype plugins return a separate function
|
||||
return function (tree, file) {
|
||||
file.data.astro.frontmatter.customProperty = 'Generated property';
|
||||
}
|
||||
}
|
||||
remarkReadingTime
|
||||
],
|
||||
}),
|
||||
//AstroPWA({}),
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
export default {
|
||||
"environment": "build",
|
||||
"environment": "dev",
|
||||
"isSsrBuild": false,
|
||||
"projectBase": "",
|
||||
"publicDir": "C:\\Users\\zx\\Desktop\\polymech\\polymech-site\\public\\",
|
||||
"rootDir": "C:\\Users\\zx\\Desktop\\polymech\\polymech-site\\",
|
||||
"mode": "production",
|
||||
"outDir": "C:\\Users\\zx\\Desktop\\polymech\\polymech-site\\dist\\",
|
||||
"assetsDir": "_astro",
|
||||
"mode": "dev",
|
||||
"outDir": "dist",
|
||||
"assetsDir": "/_astro",
|
||||
"sourcemap": false,
|
||||
"assetFileNames": "/_astro/[name]@[width].[hash][extname]"
|
||||
}
|
||||
@ -14,7 +14,6 @@ import GalleryK from "@/components/polymech/GalleryK.astro"
|
||||
|
||||
## Administration & Sales
|
||||
|
||||
|
||||
[sales@plastic-hub.com](mailto:/sales@plastic-hub.com)
|
||||
|
||||
Anne Barbier - +34 691 952 287
|
||||
|
||||
Reference in New Issue
Block a user