Skip to content

Commit

Permalink
Release v0.2.2
Browse files Browse the repository at this point in the history
Merge pull request #13 from riccardoporreca/develop
  • Loading branch information
riccardoporreca committed Mar 30, 2020
2 parents cae177f + f916b63 commit a8ce294
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rmdgallery
Title: R Markdown Website Gallery Generator
Version: 0.2.1
Version: 0.2.2
Authors@R:
person(given = "Riccardo",
family = "Porreca",
Expand Down
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# rmdgallery 0.2.2

## Patch release

- The `gallery_site()` generator now works when `rmarkdown::render_site()` is called with any path to a directory containing the website sources (#11).

# rmdgallery 0.2.1

## Patch release
Expand Down
7 changes: 4 additions & 3 deletions R/gallery_site_generator.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ gallery_site <- function(input, ...) {
if (!quiet) message("\nMetadata from: ", meta$.meta_file)
# gallery config:
meta$gallery_config <- if (is.null(config$gallery)) list() else config$gallery
output_file <- file.path(input, file_with_ext(name, "html"))
output_file <- name # extension and directory are included by rmarkdown::render

x <- file.path(input, file_with_ext(sprintf(".tmp_%s", name), "Rmd"))
template_dir <- if (!is.null(config$gallery$template_dir)) {
file.path(input, config$gallery$template_dir)
Expand All @@ -134,9 +135,9 @@ gallery_site <- function(input, ...) {

# make some useful utils available when rendering
envir <- list2env(render_time_utils, parent = envir)

output <- render_one(input = x,
output_format = output_format, output_file = output_file,
output_format = output_format,
output_file = output_file,
output_options = list(lib_dir = "site_libs",
self_contained = FALSE),
params = knit_params,
Expand Down

0 comments on commit a8ce294

Please sign in to comment.