#' Open RStudio Terminal in active file location
#'
#' @return
#' @import rstudioapi
#' @export
#'
#' @examples
terminalHere <- function() {
termId <- terminalCreate(caption = dirname(getSourceEditorContext()$path), shellType = "win-git-bash")
terminalSend(id = termId, text = paste0("cd '", dirname(getSourceEditorContext()$path), "' \n"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.