#' Build a NEWS.md to write down development notes.
#' @author Jiaxiang Li
#'
#' @import rstudioapi
#' @import clipr
#' @importFrom glue glue
#' @importFrom xfun write_utf8
#' @importFrom stringr str_c
#' @export
news_note <- function(){
name <- "NEWS.md"
if (file.exists(name)) {
stop('NEWS.md already exists.')
}
now <- pn()
input <- glue::glue("### {now}\n
")
xfun::write_utf8(input,name)
text <-
stringr::str_c(name,' is already built.')
cat(
sep="\n"
,text
,tips()
)
rstudioapi::navigateToFile(name)
rstudioapi::setCursorPosition(Inf)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.