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

Fix website preview #627

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Conversation

Bisaloo
Copy link
Contributor

@Bisaloo Bisaloo commented Dec 2, 2024

following upstream changes in r-lib/pkgdown#2650

Otherwise, we get the following error:

image

The change upstream is complex but the gist of what we're looking at here is that fs::path() was changed to fs::path_abs(). And fs::path_abs() doesn't work the same way as path() for file paths that already start with /.

fs::path("test", "/test.html")
#> test/test.html

fs::path_abs("/test.html", "test")
#> /test.html

fs::path_abs("test.html", "test")
#> /tmp/Rtmpyp0NA5/reprex-e4b47ac38bdd-hemp-urson/test/test.html

Created on 2024-12-02 with reprex v2.1.1

@joelnitta reported a similar issue on slack. Joel, could you please try and see if this PR resolves your issue? 🙏

@froggleston
Copy link
Contributor

Many thanks @Bisaloo ! Just to confirm this won't affect lessons building against an older pkgdown version but this sandpaper version?

@Bisaloo
Copy link
Contributor Author

Bisaloo commented Dec 2, 2024

Thanks for the reminder @froggleston, I forgot to check that!

I can confirm the proposed change works fine with pkgdown 2.0.9, which predates r-lib/pkgdown#2650

@froggleston
Copy link
Contributor

I'll wait for @joelnitta to also confirm and if this all is OK on his end, I'll merge this in.

@joelnitta
Copy link
Contributor

@Bisaloo @froggleston I can confirm this works on my end!

@froggleston froggleston merged commit 6d995c8 into carpentries:main Dec 4, 2024
11 checks passed
@Bisaloo Bisaloo deleted the fix-pkgdown-preview branch December 4, 2024 12:41
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.

3 participants