Description Usage Arguments Details Value See Also
View source: R/githubify_images.R
The function will look for capitalised environmental variables of the same name as the argument set in an .Renviron
1 2 3 4 5 6 7 | githubify_images(
article_string,
local_image_path = Sys.getenv(x = "LOCAL_IMAGE_PATH"),
github_user = Sys.getenv(x = "GITHUB_USER"),
github_repo = Sys.getenv(x = "GITHUB_REPO"),
github_branch = Sys.getenv(x = "GITHUB_BRANCH")
)
|
article_string |
The article as a string, e.g. from 'readr::read_file' |
local_image_path |
The local path to the images, Default: Sys.getenv(x = "LOCAL_IMAGE_PATH") |
github_user |
Your github username, Default: Sys.getenv(x = "GITHUB_USER") |
github_repo |
The github repo hosting the article and image, Default: Sys.getenv(x = "GITHUB_REPO") |
github_branch |
The branch on the github repo to publish from, Default: Sys.getenv(x = "GITHUB_BRANCH") |
At no point does dev.to.ol check that the image is at the expected path, so remember to push your work,
and double check the paths are set correctly. setup_environ
can help with this.
The article string with the image paths changed from a local path to an expected location on GitHub.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.