-
Notifications
You must be signed in to change notification settings - Fork 505
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
docs: Convert website to use {pkgdown}
#902
Conversation
Thank you @olivroy !! Could extra requests:
|
Co-authored-by: Barret Schloerke <[email protected]>
@schloerke Would you want me to delete the old docs directory, or leaving it as |
The geojson files in By having the files as assets, they are available on the website and users can see the full url. In the past, we've had comments that the files do not exist on user's local machines when copying the example to run. So I'd like to keep the URL behavior if possible. I do not see any other files that I would keep in |
Co-authored-by: Barret Schloerke <[email protected]>
Two comments then I think we're good to go! Can we move the json files in We need to add redirect HTML files from the previous vignette locations to the new locations. In addition, I'd like to maintain the hash being used. (**working on getting an example file / instructions) |
We should add files with the content of: (untested) <!DOCTYPE html>
<html>
<body>
<h1>VIGTITLE</h1>
Please find the article at its <a href="articles/ARTICLE">new location</a>
<script>
window.location.href = "articles/ARTICLE" + window.location.hash;
</script>
</body>
</html> Where Within
|
I tested the pkgdown approach for redirects locally, but ideally, we'd overwrite the site now, and move to dev mode later? https://pkgdown.r-lib.org/reference/build_site.html#redirects |
Yes! (TIL, again!) The previous website didn't really have headers to click on to set the hash. So the pkgdown redirects will work great. Thank you |
Thank you @olivroy ! |
Thanks for the prompt review! (I would have forgotten the redirects !) I will send a follow-up early next week to address outstanding issues! And will test outstanding issues, reorder vignettes etc. maybe use the json approach and move other shapefiles / resources to to make the reproducibility of examples easier to do for users. internal links in the articles. ( I didn't want to read all the content in the context of this PR) |
I appreciate it. I look forward to the followup next week. I'll try to have the PR merged (**waiting on team approval) later today. |
{pkgdown}
{pkgdown}
Thank you @olivroy !! |
Now hosted at https://rstudio.github.io/leaflet
I think some of the information is a bit dated, but will not pursue further if there is no interest.
For deployment, you need to setup gh pages with
usethis::use_pkgdown_github_pages()
.Everything renders! Polishing probably necessary in a potential follow-up
But having the function reference online, search function seems like an improvement to me?
![Capture d’écran, le 2024-02-16 à 9 24 39 a m](https://private-user-images.githubusercontent.com/52606734/305442763-4fbdc353-1026-428b-9d6a-71227d982ea6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5ODA3MTgsIm5iZiI6MTczOTk4MDQxOCwicGF0aCI6Ii81MjYwNjczNC8zMDU0NDI3NjMtNGZiZGMzNTMtMTAyNi00MjhiLTlkNmEtNzEyMjdkOTgyZWE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE5VDE1NTMzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwMjkwN2Q3N2M3NzM5NzI4ZTQzYTBjZTVhYTg2NzE3MDE2NmRjMjdkYjYwY2FmN2IwNjRkYjZiMTlmZTdmNDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.aSPXPJ3uj5hzkwqDPiPmFi0ucfGBoiLV5PGzA8BdHvA)
Outstanding work if you decide to proceed:
On my side:
docs/
that is worth saving somewhere else?On your side:
usethis::use_pkgdown_github_pages()