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

Links to GitHub ".md" files changing to links to non-existent ".html" equivilents #763

Closed
JohnMount opened this issue Jul 12, 2018 · 1 comment
Labels
bug an unexpected problem or unintended behavior linking 📎

Comments

@JohnMount
Copy link

JohnMount commented Jul 12, 2018

For GitHub projects with a README.md (or README.Rmd) links that happen to link to ".md" files in the same GitHub project get converted from ".md" to ".html" during pkgdown::build_site() (and are thus broken as pkgdown is not in a position to produce those ".html" files). This is happening to links that are not part of the doc-tree and thus should not be translated. My guess is pkgdown thinks these are links under its management (thinks they are pointing into the doc area and need to change to ".html") when they are links to un-related sections of the package/project.

Minimal example explaining the issue here.

A work-around is to relpace ".md" with "%2Emd" to hide the links from the processor.

@hadley
Copy link
Member

hadley commented Sep 13, 2018

i.e. tweak_md_links() should check only modify relative paths, not paths that have a protocol.

@hadley hadley added bug an unexpected problem or unintended behavior linking 📎 labels Nov 6, 2018
@hadley hadley closed this as completed in 18e30a5 Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior linking 📎
Projects
None yet
Development

No branches or pull requests

2 participants