Skip to content

Commit

Permalink
feat(blog/til): add an anchor for direct go to TIL
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed Dec 18, 2023
1 parent 8d15cbb commit 44e8fc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/blog/til/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { allTILs, TIL } from 'contentlayer/generated'

import { Title } from '@/shared/components/title'
import { Date as DateUI } from '@/shared/components/date'
import { slug } from '@/shared/lib/slug'

import 'katex/dist/katex.min.css'

Expand Down Expand Up @@ -37,7 +38,8 @@ const TILComponent = ({ til }: { til: TIL }) => {
))}
</div>
</div>
<div className="post-content til-content md:w-2/3">
<div className="post-content til-content relative md:w-2/3">
<span className="absolute -top-24" id={slug(til.title)} />
<MDXContent />
</div>
</div>
Expand Down

0 comments on commit 44e8fc5

Please sign in to comment.