Skip to content
Discussion options

You must be logged in to vote

Regarding your two bullet points:

  1. You use a pathPrefix of /blog and when you use the navigate function your resulting URL is: https://cangsdarm.github.io/blog/blog/archive/encryptingSaveGames/#Why?

    So you have a double /blog/blog. There's no need to use navigate as the normal <a> tag can already do what you want. Do have the same links as the id that are set on the headings you should access the tableOfContents field on the mdx node. You can find articles like these when searching for "Gatsby ToC": https://desktopofsamuel.com/how-to-create-a-scroll-tracking-table-of-content-in-gatsby/ or https://scottspence.com/2020/02/13/smooth-scroll-toc-gatsby/ or https://johno.com/mdx-table-of-conte…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cangSDARM
Comment options

Answer selected by cangSDARM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #32165 on June 30, 2021 08:01.