tailwind-nextjs-starter-blog icon indicating copy to clipboard operation
tailwind-nextjs-starter-blog copied to clipboard

"View on GitHub" link does not contain file extension

Open jvereecken opened this issue 3 years ago • 3 comments

Describe the bug The 'view on Github' link does not work due to it receiving a slug instead of a filename

To Reproduce Steps to reproduce the behavior:

  1. Go to a Blog post
  2. Click on View on Github
  3. Link will not work

Expected behavior View on Github link should work

jvereecken avatar Jul 13 '22 06:07 jvereecken

Hi, which link is not working? I tried a few on the demo site (https://tailwind-nextjs-starter-blog.vercel.app/) and it seems to be redirecting to Github correctly.

timlrx avatar Jul 13 '22 16:07 timlrx

Hmm, it looks like a version mismatch of sorts. I have installed the template by using the npx degit 'timlrx/tailwind-nextjs-starter-blog#contentlayer'command as shown in the readme. Looks like it is not working in that version

jvereecken avatar Jul 14 '22 06:07 jvereecken

Thanks, you're right. I would suggest manually patching it by including the file extension e.g. .mdx in this line https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/contentlayer/layouts/PostLayout.tsx#L14

That's part of the trouble with maintaining 3 different version. I will patch it in the new project - https://github.com/timlrx/pliny and roll it out for this template soon.

timlrx avatar Jul 14 '22 14:07 timlrx

This has been patched in pliny which I will be copying over to this repository soon.

timlrx avatar Oct 24 '22 15:10 timlrx