Layouts, ProseA rework and PreviewContent creation. Trying to fix hydration by making better SSR.

This commit is contained in:
2024-08-20 18:02:16 +02:00
parent 2e92c389a2
commit 04785ecf27
20 changed files with 344 additions and 359 deletions

View File

@@ -4,6 +4,7 @@ import RemarkParse from "remark-parse";
import RemarkRehype from 'remark-rehype';
import RemarkOfm from 'remark-ofm';
import RemarkBreaks from 'remark-breaks'
import RemarkGfm from 'remark-gfm';
export default function useMarkdown(): (md: string) => Root
@@ -13,7 +14,7 @@ export default function useMarkdown(): (md: string) => Root
const parse = (markdown: string) => {
if (!processor)
{
processor = unified().use([RemarkParse, RemarkGfm, RemarkOfm, RemarkRehype]);
processor = unified().use([RemarkParse, RemarkBreaks, RemarkGfm, RemarkOfm, RemarkRehype]);
}
const processed = processor.runSync(processor.parse(markdown)) as Root;