Skip to content

Commit

Permalink
Do not write search file if search is deactivated in config (#449)
Browse files Browse the repository at this point in the history
* Do not write search file if search is deactivated in config

Related to #425
  • Loading branch information
cderv authored May 11, 2022
1 parent 84e21e9 commit 82b9872
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: distill
Title: 'R Markdown' Format for Scientific and Technical Writing
Version: 1.3.11
Version: 1.3.12
Authors@R: c(
person("JJ", "Allaire", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0174-9868")),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# distill (development version)

- Fix an issue with `search.json` that was still written even when `search: false` in set in config (thanks, \\\@mitchelloharawild, #425).
- Fix an issue prevent sizing of figures produced with **knitr** using `out.width` chunk option (thanks, \\\@ssp3nc3r, #286).
- Fix an issue with running `targets::tar_render()` with a distill Rmd document (thanks, \\\@tarensanders, #400)
- Fix an issue with `full_content: true` for RSS feed creation (thanks, \\\@yuryzablotski, #454).
Expand Down
5 changes: 4 additions & 1 deletion R/distill_website.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ distill_website <- function(input, encoding = getOption("encoding"), ...) {
write_sitemap_xml(input, config)

# write top level article search index
write_search_json(input, config)
# if search is activated
if (site_search_enabled(config)) {
write_search_json(input, config)
}

# return result
result
Expand Down

0 comments on commit 82b9872

Please sign in to comment.