Replies: 4 comments
|
Some background here: I'm trying to build a website, where one of the page can show all the titles, dates of my blog posts. (Actually I'm not sure if these two functions are from the Any comments will be welcomed. |
|
OK, based on here: https://mdxjs.com/guides/frontmatter/ import solid from "solid-start/vite";
import { defineConfig } from "vite";
import unocss from "unocss/vite";
import unocssPlugin from "unocss/vite";
import mdx from "@mdx-js/rollup";
import remarkGfm from "remark-gfm";
import remarkFrontmatter from "remark-frontmatter"; // YAML and such. <--------- HERE
export default defineConfig({
plugins: [
unocssPlugin(),
unocss(),
{
...(await import("@mdx-js/rollup")).default({
jsx: true,
jsxImportSource: "solid-js",
providerImportSource: "solid-mdx",
remarkPlugins: [remarkGfm, remarkFrontmatter], <--------- HERE
}),
enforce: "pre",
},
solid({
extensions: [".mdx", ".md"],
ssr: true,
}),
],
});But I'm still unable to utilize the |
To me it looks like |
|
You can try vite-plugin-solid-markdown
You can try vite-plugin-solid-markdown |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to use this piece of code (from solid-start repo) to import my
mdxormdfiles:solid-start/docs.root.tsx
Line 20 in b2a09b3
However, if I don't activate
mdxin thevite.config.ts, thegetHeadings()andgetFrontMatter()functions are not available.If I add
mdxto thevite.config.tsas the doc shows:When I start the server, I get this error:
If I do
Then the the frontmatter of the
mdxfiles cannot be parsed correctly:It seems I cannot get the
mdxpackage work withsolidjsanyhow...All reactions