Fix markdown highlighting

This commit is contained in:
Braydon 2024-04-20 21:42:31 -04:00
parent 5e67ce1f34
commit 534e67b6f0
6 changed files with 26 additions and 11 deletions

@ -5,4 +5,4 @@ summary: 'utinam delicata nominavi ornare eirmod pharetra decore interesset nece
---
# bob
HELLO JOHN
HELLO **JOHN**

@ -38,6 +38,7 @@
"react-dom": "^18",
"react-hook-form": "^7.51.3",
"remark-gfm": "^4.0.0",
"remote-mdx": "^0.0.4",
"restfulmc-lib": "^1.1.3",
"shadcn-ui": "0.8.0",
"sharp": "^0.33.3",

@ -11,6 +11,7 @@ import {
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb";
import { capitalize } from "@/lib/stringUtils";
import { CustomMDX } from "@/mdx-components";
/**
* The page to display content
@ -59,6 +60,9 @@ const ContentPage = ({ params }: PageProps): ReactElement => {
)}
</BreadcrumbList>
</Breadcrumb>
{/* Content */}
<CustomMDX source={content.content} />
</main>
);
};

@ -12,7 +12,7 @@ const DocumentationLayout = ({
}: Readonly<{
children: ReactNode;
}>): ReactElement => (
<section className="h-screen flex justify-center items-center">
<section className="h-screen pt-64 flex justify-center">
<div className="flex gap-10">
<Sidebar />
{children}

@ -1,10 +1,20 @@
import type { MDXComponents } from "mdx/types";
import { ReactElement, ReactNode } from "react";
import { MDXRemote } from "remote-mdx/rsc";
export const useMDXComponents = (components: MDXComponents): MDXComponents => {
return {
h1: ({ children }) => (
<h1 className="text-6xl font-semibold">{children}</h1>
),
...components,
};
const components: any = {
h1: ({ children }: { children: ReactNode }) => (
<h1 className="text-3xl">{children}</h1>
),
};
export const CustomMDX = (props: any): ReactElement => {
return (
<MDXRemote
{...props}
components={{
...components,
...(props.components || {}),
}}
/>
);
};

@ -4,7 +4,7 @@ const { screens } = require("tailwindcss/defaultTheme");
const config = {
darkMode: ["class"],
content: ["./src/app/**/*.{ts,tsx,mdx}"],
content: ["./src/app/**/*.{ts,tsx}"],
theme: {
container: {
center: true,