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

Wrong "Edit in github" url with Permalinks. #1425

Closed
1 task done
mathieutu opened this issue Mar 11, 2019 · 6 comments
Closed
1 task done

Wrong "Edit in github" url with Permalinks. #1425

mathieutu opened this issue Mar 11, 2019 · 6 comments
Labels
has PR Has a related PR

Comments

@mathieutu
Copy link
Contributor

mathieutu commented Mar 11, 2019

  • I confirm that this is an issue rather than a question.

Bug report

Version

1.0.0-alpha.43

Steps to reproduce

What is expected?

When setting a permalink configuration and clicking on the "edit on github" link, the link should target the right place of the page in the repo.

What is actually happening?

The link is wrong, and target the permalink path.

Other relevant information

I've also the blog plugin.

@YunYouJun
Copy link
Contributor

Can you provide more config information?

This is my config, and it works.

module.exports = {
  themeConfig: {
    repo: 'YunYouJun/software-engineering-note',
    docsDir: 'docs',
    editLinks: true,
    editLinkText: 'Edit in GitHub'
  }
}

@shigma shigma added the status: awaiting more context Need more context about this issue label Mar 11, 2019
@shigma
Copy link
Collaborator

shigma commented Mar 11, 2019

You should provide more details. What is your themeConfig and what is this "wrong link"?

@mathieutu
Copy link
Contributor Author

my concerned config is:

permalink: ':year/:slug',
themeConfig: {
    repo: 'mathieutu/blog',
    repoLabel: 'GitHub',
    editLinks: true,
}

And the problem is that in the "edit link" the permalink path is used instead of the real file path:
Screen Shot 2019-03-11 at 13 06 37

If I set permalink: false the url is ok:
Screen Shot 2019-03-11 at 13 10 35

@shigma
Copy link
Collaborator

shigma commented Mar 11, 2019

This issue will be fixed by #1419 😄

@shigma shigma added has PR Has a related PR and removed status: awaiting more context Need more context about this issue labels Mar 11, 2019
@mathieutu
Copy link
Contributor Author

ok thanks!

@ulivz
Copy link
Member

ulivz commented Mar 12, 2019

Fixed at #1419

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has PR Has a related PR
Projects
None yet
Development

No branches or pull requests

4 participants