From 73fe7e49c6fe5f0db9ebc93ba821d3a3ee57c7be Mon Sep 17 00:00:00 2001 From: christopher crew baker Date: Thu, 1 Nov 2018 20:25:46 -0400 Subject: [PATCH] don't rewrite build_rmarkdown_format in pkgdown b/c no longer using paged data frame printing --- inst/site/build-site.R | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/inst/site/build-site.R b/inst/site/build-site.R index 8a6d140..fce3738 100644 --- a/inst/site/build-site.R +++ b/inst/site/build-site.R @@ -1,34 +1,3 @@ -swap_render_fun <- function() { - - # Alter pkgdown:::build_rmarkdown_format - build_rmarkdown_format2 <- function(pkg = ".", - depth = 1L, - data = list(), - toc = TRUE) { - path <- tempfile(fileext = ".html") - suppressMessages( - pkgdown::render_page(pkg, "vignette", data, path, depth = depth) - ) - list( - path = path, - format = rmarkdown::html_document( - toc = toc, - toc_depth = 2, - self_contained = FALSE, - theme = NULL, - template = path, - df_print = "paged", # line added by crew102 - rownames.print = FALSE - ) - ) - } - # old_fun <- get("build_rmarkdown_format", envir = asNamespace("pkgdown")) - # attributes(build_rmarkdown_format2) <- attributes(old_fun) - assignInNamespace( - "build_rmarkdown_format", build_rmarkdown_format2, ns = "pkgdown" - ) -} - build_site <- function() { # Render extra vignettes and move vignettes for pkgdown to pick up extra_vigs <- list.files( @@ -38,9 +7,5 @@ build_site <- function() { on.exit(try(unlink(x = to, force = TRUE))) file.copy(extra_vigs, to = to) - # Change render function in pkgdown so it uses paged df printing - swap_render_fun() - - # Build site pkgdown::build_site() }