# setup -------------------------------------------------------------------
library(devtools)
use_git()
# https://github.com/JiaxiangBU/add2impala/blob/master/DESCRIPTION
file.edit("DESCRIPTION")
library(devtools)
use_build_ignore("dev_history.R")
use_roxygen_md()
use_pipe()
library(magrittr)
options(usethis.full_name = "Jiaxiang Li")
use_mit_license()
# rm packrat --------------------------------------------------------------
# rm -rf packrat
# desc --------------------------------------------------------------------
add2pkg::add_me(is_paste = TRUE)
file.edit("DESCRIPTION")
# coding ------------------------------------------------------------------
file.edit("R/build_iframe.R")
# add title
use_r("utils")
use_r("extract_highlight")
file.edit("inst/rstudio/addins.dcf")
file.edit("R/checkbox.R")
file.edit("R/list_in_order.R")
use_r("list")
use_r("word_style")
use_r("str_to_x")
# use_addin("change_to_upper")
use_r("kbd")
use_addin("tab_sep2md")
use_addin("get_quote")
use_addin("paste_apple_book")
# prettify ----------------------------------------------------------------
use_readme_rmd()
# help translate XGBoost model R object into SQL statement.
file.edit("DESCRIPTION")
rmarkdown::render("README.Rmd")
file.remove("README.html")
# build -------------------------------------------------------------------
library(devtools)
document()
load_all()
library(devtools)
document()
install()
# commit
# release -----------------------------------------------------------------
use_news_md()
file.edit("NEWS.md")
use_version()
usethis::use_github_release()
# add disclaimer ----------------------------------------------------------
file.edit("DESCRIPTION")
clipr::write_clip('`r add2pkg::add_disclaimer("Jiaxiang Li")`')
file.edit("README.Rmd")
rmarkdown::render("README.Rmd")
rstudioapi::viewer("README.html")
file.remove("README.html")
usethis::use_code_of_conduct()
# publish -----------------------------------------------------------------
# open it and link it.
# https://zenodo.org/account/settings/github/
# push
# make public
use_news_md()
use_version()
file.edit("NEWS.md")
use_github_release()
file.edit("README.Rmd")
rmarkdown::render("README.Rmd")
rstudioapi::viewer("README.html")
safely(file.remove)("README.html")
# 因为会更新 citations,但是要等一会。
# publish release
# add badge and citation --------------------------------------------------
# login zenodo and copy badge in markdown
clipr::write_clip('## Citations
```{r include=FALSE}
citations <- add2pkg::add_zenodo_citation("README.Rmd")
```
```{r echo=FALSE, results=\'asis\'}
cat(citations$Cite)
```
```{r echo=FALSE, results=\'asis\'}
cat(paste0("```BibTex\\n",citations$BibTex,"\\n```"))
```
```{r echo=FALSE, results=\'asis\'}
cat(citations$Comments)
```')
file.edit("README.Rmd")
# 需要等一段时间,有时候 doi 没有显示出来
rmarkdown::render("README.Rmd")
rstudioapi::viewer("README.html")
safely(file.remove)("README.html")
# add vignette ------------------------------------------------------------
use_vignette("introduction")
# build -------------------------------------------------------------------
document()
# load_all()
install()
# pkgdown -----------------------------------------------------------------
start_time <- lubridate::now()
pkgdown::build_site()
end_time <- lubridate::now()
end_time - start_time
# mv img
# mv inst/pic/* man/figures/
# add logo ----------------------------------------------------------------
use_logo("man/figures/logo.png")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.