Description Usage Arguments Details Value See Also Examples
View source: R/post_new_article.R
Create a new post from an .Rmd.
1 | post_new_article(file, key = NA)
|
file |
The path to the file |
key |
Your API key, Default: NA |
Will look for an api key in the '.REnviron' file. Seems to check if the body is identical to a previous article and error if so with '"Body markdown has already been taken"'. The following YAML arguments are read from the file YAML frontmatter if present:
A character string
A character string
A boolean
list of character strings: ["tag1", "tag2"]
dev.to will not allow tags with spaces, so tags with spaces will be automatically collapsed.
The default table output method renders a very large print code block.
The workaround is to use kable
.
The response
yaml_front_matter
,render
read_file
str_remove
glue
POST
,add_headers
,content
1 2 3 4 5 6 | ## Not run:
if(interactive()){
post_new_article("./articles/my_article.Rmd")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.