R/rstudio.R

Defines functions preview

preview <- function(input, ...) {
  convert(file = input, clip = FALSE, full_html = TRUE)
  htmlFile <- paste0(tools::file_path_sans_ext(input), ".html")
  message(
    "Preview output created: ", htmlFile, "\n",
    "CSS files used: \n", paste("  *", the$stylesheet, collapse = "\n")
  )

  message(
    "Please verify the final result on your CMS site.\n",
    "To produce the final result, run juicedown::convert() ",
    "in the console."
  )

  invisible(utils::browseURL(htmlFile))
}

Try the juicedown package in your browser

Any scripts or data that you put into this service are public.

juicedown documentation built on Sept. 8, 2023, 5:11 p.m.