Skip to content

Commit 18c59bf

Browse files
committed
Hugo no longer supports yes/no as Boolean in YAML
1 parent 513bd89 commit 18c59bf

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: blogdown
33
Title: Create Blogs and Websites with R Markdown
4-
Version: 1.21.1
4+
Version: 1.21.2
55
Authors@R: c(
66
person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")),
77
person("Christophe", "Dervieux", role = "aut", email = "cderv@posit.co", comment = c(ORCID = "0000-0003-4474-2498")),

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
- Due to the complexity, HugoBlox themes are no longer tested against blogdown, hence are not guaranteed to work with blogdown any more.
44

5+
- When converting metadata to YAML (e.g., in `new_site(to_yaml = TRUE)`), logical values are converted to `true`/`false` instead of `yes`/`no` now. This is because [Hugo v0.152.0](https://github.com/gohugoio/hugo/releases/tag/v0.152.0) no longer supports `yes`/`no` as logical values.
6+
57
# CHANGES IN blogdown VERSION 1.21
68

79
- Use the `--renderToMemory` flag by default for Hugo >= 0.123.0 when starting `hugo server` (thanks, @drmowinckels, #772). If you do not wish to use this flag by default, please see https://bookdown.org/yihui/blogdown/livereload.html on how to configure your own default flags for `hugo server`.

R/utils.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,9 @@ yaml_load_file = function(...) yaml::yaml.load_file(...)
830830

831831
# a wrapper of yaml::as.yaml() to indent sublists by default and trim white spaces
832832
as.yaml = function(..., .trim_ws = TRUE) {
833-
res = yaml::as.yaml(..., indent.mapping.sequence = TRUE)
833+
res = yaml::as.yaml(..., indent.mapping.sequence = TRUE, handlers = list(
834+
logical = yaml::verbatim_logical
835+
))
834836
Encoding(res) = 'UTF-8'
835837
if (.trim_ws) sub('\\s+$', '', res) else res
836838
}

0 commit comments

Comments
 (0)