Is there a way to remove / hide the anchor links (#) from titles? #2392
Unanswered
mirecatercero
asked this question in
Q&A
Replies: 1 comment
-
Are you referring to the generated anchor elements from using MDX If so, you can replace them with JSX. {*/ Previous */}
## I am a link {/* import your cn if you have one */}
import { cn } from '@/utils'
export const levelStyles = {
h1: 'text-xl',
h2: 'text-lg',
{/* You can copy and add your styles here */}
}
export function CustomHeader({ children, hLevel, className, ...props }) {
return <p className={cn ? cn(levelStyles[hLevel], className) : className ?? ''}>{children}</p>
}
<CustomHeader hLevel='h2'>I am no longer a link</CustomHeader> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to eliminate them since my SEO team told me that they are not good for SEO
Beta Was this translation helpful? Give feedback.
All reactions