#' Quickly rename the current document
#' @author Jiaxiang Li
#'
#' @import rstudioapi
#' @export
rename_doc <- function(){
file_name <- basename(rstudioapi::getSourceEditorContext()$path)
file_newname <- selected()
file.rename(file_name,file_newname)
rstudioapi::navigateToFile(file_newname)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.