custom <Link /> wrapper around next/link

This commit is contained in:
2022-01-30 10:33:40 -05:00
parent 2a29d713bb
commit 9f34cec930
35 changed files with 578 additions and 1009 deletions
+1
View File
@@ -5,6 +5,7 @@ export { default as Image } from "../components/Image/Image";
export { default as Figure } from "../components/Figure/Figure";
// These (mostly very small) components are direct replacements for HTML tags generated by remark:
export { default as a } from "../components/Link/Link";
export { default as code } from "../components/CodeBlock/CodeBlock";
export { default as blockquote } from "../components/Blockquote/Blockquote";
export { default as hr } from "../components/HorizontalRule/HorizontalRule";
+1 -6
View File
@@ -12,7 +12,6 @@ import { NOTES_DIR, baseUrl } from "./config";
// remark/rehype markdown plugins
import remarkGfm from "remark-gfm";
import rehypeExternalLinks from "rehype-external-links";
import rehypeSlug from "rehype-slug";
// note: 'common' only exports these languages: https://github.com/wooorm/refractor/blob/main/lib/common.js
// eslint-disable-next-line import/no-unresolved
@@ -70,11 +69,7 @@ export const getNote = async (slug: string): Promise<NoteType> => {
parseFrontmatter: false,
mdxOptions: {
remarkPlugins: [[remarkGfm, { singleTilde: false }]],
rehypePlugins: [
[rehypeExternalLinks, { target: "_blank", rel: ["noopener", "noreferrer"] }],
[rehypeSlug, {}],
[rehypePrism, { ignoreMissing: true }],
],
rehypePlugins: [[rehypeSlug], [rehypePrism, { ignoreMissing: true }]],
},
});