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

allow for external site folder via environment variable #537

Merged
merged 13 commits into from
Nov 15, 2023
Merged

Conversation

zkamvar
Copy link
Contributor

@zkamvar zkamvar commented Nov 9, 2023

This Pull request will fix #536 by allowing users to specify an experimental SANDPAPER_SITE environment variable to be the path to a folder where the site should be rendered.

To install this PR, you can use {pak}:

pak::pkg_install("carpentries/sandpaper#537")

To test this out, navigate to a lesson you want to test and open R, running:

tmp <- tempfile()
Sys.setenv("SANDPAPER_SITE" = tmp)
sandpaper::serve()

You should see the site building into the temporary folder.

In BASH, you can use the following:

TMP=$(mktemp -d)
SANDPAPER_SITE=${TMP} R -q -e 'sandpaper::serve(quiet = FALSE)'

@zkamvar zkamvar marked this pull request as ready for review November 10, 2023 19:37
@zkamvar
Copy link
Contributor Author

zkamvar commented Nov 15, 2023

This finally passes tests and I have confirmed with the author of the original issue that it works on their end, so I am happy to merge this.

@zkamvar zkamvar merged commit 89db200 into main Nov 15, 2023
12 checks passed
@zkamvar zkamvar deleted the extsite branch November 15, 2023 19:53
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.

Add build_path option for sandpaper::serve
1 participant