Skip to content

Commit

Permalink
Fix anchor link
Browse files Browse the repository at this point in the history
  • Loading branch information
bluprince13 committed Jul 21, 2024
1 parent 257a659 commit e09137c
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/pages/blog/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { ComparisonTable } from '@Components/ComparisonTable'
import { Typography } from '@mui/material'
import 'prism-theme-night-owl'
import Link from 'next/link'
import { Iframe } from '@Components/Iframe'

const components = {
Figure,
Expand All @@ -43,7 +44,8 @@ const components = {
ComparisonTable,
Typography,
Link,
mermaid: Mermaid
mermaid: Mermaid,
Iframe
}

interface Props {
Expand Down Expand Up @@ -101,28 +103,27 @@ export const getStaticProps: GetStaticProps<{
],
rehypePlugins: [
slug,
[
rehypeCitation,
{
bibliography: data.bibliography,
linkCitations: true,
csl: 'vancouver'
}
],
[
link,
{
behaviour: 'append',
properties: { ariaHidden: 'false', tabIndex: -1 },
behavior: 'append',
properties: { ariaHidden: 'false', tabIndex: 0 },
content: {
type: 'element',
tagName: 'span',
properties: {
className: ['anchor', 'fas', 'fa-link']
},
children: []
}
}
}
],
[
rehypeCitation,
{
bibliography: data.bibliography,
linkCitations: true,
csl: 'vancouver'
}
]
]
},
Expand Down

0 comments on commit e09137c

Please sign in to comment.