hikerpig / gatsby-project-kb

Developing gatsby-theme-kb, a Gatsby theme for publishing Knowledge Base.
https://gatsby-project-kb.vercel.app/
MIT License
62 stars 15 forks source link

Convert wikilinks to markdown titles #9

Closed SanketDG closed 3 years ago

SanketDG commented 3 years ago

Currently the wikilinks are rendered as it is.

Is it possible to convert [[wikilink]] to [[Wikilink]] or whatever the first h1 title is?

hikerpig commented 3 years ago

Thank you for the feedback. Yes, it is possible in theory, I just havn't found an elegant way to do it back then. I will try to add this in this weekend.

hikerpig commented 3 years ago

@SanketDG I managed to add this feature (although still not very elegantly). You can check the code diff to see how the option works. I haven't made [[{{title}}]] the default option for gatsby-theme-kb though, so you may need to manually specify it in your config. The latest package is gatsby-theme-kb@0.7.2.

SanketDG commented 3 years ago

I tried this out, this looks good!

Thanks so much, I am going to close this now.