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

Support tweak link to Markdown with anchor #2313

Closed
rgaiacs opened this issue Jun 1, 2023 · 0 comments · Fixed by #2469
Closed

Support tweak link to Markdown with anchor #2313

rgaiacs opened this issue Jun 1, 2023 · 0 comments · Fixed by #2469
Labels
feature a feature request or enhancement linking 📎
Milestone

Comments

@rgaiacs
Copy link

rgaiacs commented Jun 1, 2023

Consider the follow minimal README.md:

[foo](foo.md)

[bar]{bar.md#awesome)

pkgdown::build_site() will convert it to

<a href="foo.html">foo</a>

<a href="bar.md#awesome">bar</a>

instead of

<a href="foo.html">foo</a>

<a href="bar.html#awesome">bar</a>

This happen because in

needs_tweak <- grepl("\\.md$", hrefs) & xml2::url_parse(hrefs)$scheme == ""
we expect the link to end with .md.

Can we support links that include an anchor? Thanks!

rgaiacs added a commit to GESIS-Methods-Hub/andrew that referenced this issue Jun 23, 2023
@hadley hadley added feature a feature request or enhancement linking 📎 labels Oct 30, 2023
@hadley hadley added this to the 2.1.0 milestone Apr 12, 2024
hadley added a commit that referenced this issue Apr 18, 2024
hadley added a commit that referenced this issue Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement linking 📎
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants