improve slashing + base href behavior
+ prefix sidebar links & mdx links with base + add trailing slashes
This commit is contained in:
parent
8a0cf14fd7
commit
ac41426a20
4 changed files with 15 additions and 8 deletions
|
|
@ -73,7 +73,7 @@ const TableOfContents: FC<{ headings: MarkdownHeading[]; currentPage: string }>
|
|||
.map((heading, i) => (
|
||||
<li className={`w-full`} key={i}>
|
||||
<a
|
||||
href={`${currentPage}#${heading.slug}`}
|
||||
href={`${currentPage}/#${heading.slug}`}
|
||||
onClick={onLinkClick}
|
||||
className={`py-0.5 block cursor-pointer w-full border-l-4 border-lineHighlight hover:bg-lineHighlight ${
|
||||
['pl-4', 'pl-9', 'pl-12'][heading.depth - minDepth]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue