mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-21 20:15:40 +00:00
Fix issue heading issue
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 2m35s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 2m35s
This commit is contained in:
parent
1715e0c275
commit
19306831ec
@ -1,5 +1,6 @@
|
||||
import type {MDXComponents} from 'mdx/types'
|
||||
import {createSlug} from './lib/createSlug'
|
||||
import Link from 'next/link'
|
||||
|
||||
// This file allows you to provide custom React components
|
||||
// to be used in MDX files. You can import and use any
|
||||
@ -9,7 +10,9 @@ import {createSlug} from './lib/createSlug'
|
||||
// This file is required to use MDX in `app` directory.
|
||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||
return {
|
||||
h2: ({children}) => <h2>{children}<a className='ml-1' href={`#${createSlug(children)}`}>#</a></h2>,
|
||||
h2: ({children}) =>
|
||||
// @ts-ignore TS18049
|
||||
<h2 id={createSlug(children.toString())}>{children}<Link className='ml-1' href={`#${createSlug(children.toString())}`} name="anchor" scroll={false}>#</Link></h2>,
|
||||
// Allows customizing built-in components, e.g. to add styling.
|
||||
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
|
||||
...components,
|
||||
|
Loading…
Reference in New Issue
Block a user