Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix edit link #1261

Merged
merged 2 commits into from
Sep 8, 2020
Merged

fix edit link #1261

merged 2 commits into from
Sep 8, 2020

Conversation

chenxsan
Copy link
Contributor

@chenxsan chenxsan commented Sep 8, 2020

The Edit this page on Github button on this https://mdxjs.com/getting-started page points to https://github.com/mdx-js/mdx/edit/master/docs/getting-started.mdx which returns 404, the right one is https://github.com/mdx-js/mdx/edit/master/docs/getting-started/index.mdx.

And here's the code deciding to append /index.mdx or not:

https://github.com/mdx-js/mdx/blob/master/packages/gatsby-theme-mdx/src/components/edit-link.js#L11

It doesn't really eliminate the problem because user can still access /getting-started and has a broken edit link, but it's no longer a problem if they access /getting-started page by clicking the sidebar menu.

@vercel vercel bot temporarily deployed to Preview September 8, 2020 05:52 Inactive
@vercel
Copy link

vercel bot commented Sep 8, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mdx/mdx/rh6f3gw26
✅ Preview: https://mdx-git-fork-chenxsan-bugfix-fix-edit-link.mdx.vercel.app

@wooorm
Copy link
Member

wooorm commented Sep 8, 2020

Any reason why this is marked as WIP?

@vercel vercel bot temporarily deployed to Preview September 8, 2020 10:07 Inactive
@chenxsan chenxsan marked this pull request as ready for review September 8, 2020 10:07
@johno johno merged commit cad48ad into mdx-js:master Sep 8, 2020
@chenxsan chenxsan deleted the bugfix/fix-edit-link branch September 8, 2020 23:26
wooorm pushed a commit that referenced this pull request Dec 17, 2020
* fix edit link

* fix another one
wooorm pushed a commit that referenced this pull request Dec 17, 2020
* fix edit link

* fix another one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants