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

Indicate that absolute URLs are needed for search #2340

Closed
wants to merge 1 commit into from
Closed

Indicate that absolute URLs are needed for search #2340

wants to merge 1 commit into from

Conversation

peterdesmet
Copy link
Contributor

Getting started suggests to start with usethis::use_pkgdown(). This sets _pkgdown.yml to

url: ~
template:
  bootstrap: 5

I thought ~ was the recommended way to set the url: if I change domain name, I don't have to edit this file. I recently discovered however that for a website like org.github.io/my_package search results will link to the incorrect page at org.github.io, ignoring my_package. This issue was reported in #1945, with the suggested fix to provide the domain name in url.

Indeed, this is indicated in Getting started, but I think it might be good to indicate search is one of the functions that requires absolute URLs.


The current example in the documentation is:

url: https://pkgdown.r-lib.org

Perhaps it is more useful to provide an non-root domain example, which is typical for users who host their pkgdown site from GitHub Pages (e.g. https://my_org.github.io/my_package). This could then also provide guidance on whether to use an ending slash or not:

url: https://example.com/mypackage

@peterdesmet peterdesmet closed this by deleting the head repository Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant