Skip to content

Commit aa75b5f

Browse files
committed
fix #1160: allow the site field to be quoted in YAML
1 parent 92de8a4 commit aa75b5f

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bookdown
22
Type: Package
33
Title: Authoring Books and Technical Documents with R Markdown
4-
Version: 0.22.2
4+
Version: 0.22.3
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("JJ", "Allaire", role = "ctb"),

NEWS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212
````
1313

1414
However, as _beamer_ defines its own LaTeX throem environments, **bookdown** won't add any definition in preamble as it is doing with `pdf_book()`. This means user will have to define the ones supported by **bookdown** and not yet defined by _beamer_. Special environment from _beamer_ (like `fact`) needs to be used with usual [Custom Blocks syntax](https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html). See related issues for examples in their discussions thread (thanks, @XiangyunHuang, #1143, #1145).
15+
1516
This change comes with several small improvements in `custom-enviromnent.lua` for `latex` and `beamer` format, including a new option `bookdown.theorem.preamble` to opt-out **bookdown** addition of theorems and proofs definitions in LaTeX preamble. Set it to `FALSE` if you have conflict with some specific format for example (like #1001).
16-
17+
18+
- When the `site` field is quoted in `index.Rmd`'s YAML data (i.e., `site: "bookdown::bookdown_site"`), **bookdown** fails to identify the root directory of the book (thanks, @dchiu911, #1160).
19+
1720
# CHANGES IN bookdown VERSION 0.22
1821

1922
## NEW FEATURES

R/site.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ find_book_name = function(config, default) {
8686
find_book_proj = function(input) {
8787
# if bookdown_site() is executed it is because site: has been set in index.Rmd
8888
rules = matrix(c(
89-
'^index.Rmd$', '^\\s*site:\\s*bookdown::bookdown_site\\s*$'
89+
'^index.Rmd$', '^\\s*site:\\s*["\']?bookdown::bookdown_site["\']?\\s*$'
9090
), ncol = 2, byrow = TRUE, dimnames = list(NULL, c('file', 'pattern')))
9191
xfun::proj_root(input, rules)
9292
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy