setup_environ: Setup .Renviron

Description Usage Arguments Details Value See Also Examples

View source: R/setup_environ.R

Description

Write a .Renviron file with the details needed for dev.to

Usage

1
2
3
4
5
6
7
setup_environ(
  devto,
  github_user,
  github_repo,
  github_branch = "main",
  local_image_path = getwd()
)

Arguments

devto

Your API key

github_user

Your GitHub Username

github_repo

Your GitHub Repo with your articles

github_branch

Your GitHub branch that you are publishing from, Default:'main'

local_image_path

The local path prefix your images get stored at, Default: getwd()

Details

To embed the links to images in dev.to posts, dev.to.ol uses GitHub as an image hosting service. This means that your locally generated images (like graphs) should be committed to a public repo. githubify_images does the work of identifying a local image link and replacing it with the expected location on GitHub.

Value

A brand new .Renviron file

See Also

glue

Examples

1
2
3
4
5
6
## Not run: 
if(interactive()){
 setup_environ(devto = "mysecretkey", github_user = "MyName", github_repo = "dev.to-posts")
 }

## End(Not run)

DaveParr/dev.to.ol documentation built on Aug. 8, 2020, 4:31 p.m.