theowenyoung / foam-template-gatsby-theme-primer-wiki

Another Foam template that use gatsby-theme-primer-wiki
https://demo-foam.owenyoung.com/
MIT License
38 stars 13 forks source link

[[wikilinks]] to <a> #5

Closed grgvn closed 2 years ago

grgvn commented 2 years ago

Hi and thank you for that amazing work.

[[wikilinks]] works very well in VSCode, but it seems Gatsby generate a wrong slug in the final HTML. This happens on a Windows system, when using gatsby develop or gatsby build. It doesn't happen when deploying on Netlify for example.

Problem This apply on all [[wikilinks]]. On the [[getting-started]] page for example, it uses backslashes and make the wrong path. [[graph-visualization]] becomes https://127.0.0.1/getting-started/\docs\features\graph-visualization.

Expected https://127.0.0.1/docs/features/graph-visualization

Steps to reproduce : Install the foam-template-gatsby-theme-primer-wiki, clone it on a Windows system, gatsby develop and then just click on some [[wikilinks]] on the generated documentation.

I suspect the issue is more general than just for that starter.

Any chance to get a fix or a hint ?

theowenyoung commented 2 years ago

Hi, @gregoiregavin , thanks for the report!

I don't have a window machine, I'll try to test the build on a github actions windows server.

theowenyoung commented 2 years ago

Hi, @gregoiregavin I've released a new version, updated thepackage-lock.json, you can pull the latest code of this repo.

@theowenyoung/transformer-markdown-url@1.9.6

I've build a deno on windows: https://demo-wiki.owenyoung.com/

theowenyoung commented 2 years ago

It seems that this repo build workflow did't works after upgrade some dependences in package-lock.json,

not finished Building development bundle - 13.559s

no more details, I still try to resolve the issue.

theowenyoung commented 2 years ago

It seems that since gatsby@4.6.2 will cause the wired bug, I use the direct version of gatsby gastby@4.6.0, which can solve this bug.

I can't get more details because the log didn't tell me anything.

Hope next gastby version can fix this.

Now we can use 4.6.0 version.

I noticed the workflow has been finished successfully. https://github.com/theowenyoung/foam-template-gatsby-theme-primer-wiki/actions/runs/1861560170

grgvn commented 2 years ago

Thanks a lot for your reactivity @theowenyoung ! Also for all the details.

Could pull the code and it works now.