-
Notifications
You must be signed in to change notification settings - Fork 339
Closed
Description
When running pkgdown::build_site() with pkgdown 2.2.0 and pandoc < 2.10.1, the build fails with the error:
The extension definition_lists is not supported for gfm
This might be triggered by the rmarkdown::pandoc_convert() call introduced in #2917. Perhaps some pandoc version safeguarding like in pkgdown:::convert_markdown_to_html() to skip this step gracefully when pandoc < 2.10.1 would be better behavior than an error?
From the pandoc release notes it does say in 2.10.1 "many more extensions now work with commonmark and gfm".
Minimal reproducible example
git clone https://github.com/nanxstats/pkgdown.offline.git
cd pkgdown.offlineRemove system pandoc, launch R in terminal:
# Make sure this is FALSE by removing system pandoc and launching R in terminal
pandoc::pandoc_available()
# Install user pandoc
pandoc::pandoc_install("2.10")
pandoc::pandoc_version()
#> [1] '2.10'
# Make sure this is >= 2.2.0
packageVersion("pkgdown")
#> [1] '2.2.0'
# Make sure rmarkdown can detect user pandoc
Sys.setenv(RSTUDIO_PANDOC = pandoc::pandoc_locate())
rmarkdown::pandoc_available()
# Build site
pkgdown::build_site()Expand error details
── Installing package pkgdown.offline into temporary library ───────────────────
── Building pkgdown site for package pkgdown.offline ───────────────────────────
Reading from: /home/user/pkgdown.offline
Writing to: /home/user/pkgdown.offline/docs
── Sitrep ──────────────────────────────────────────────────────────────────────
✔ URLs ok.
✔ Favicons ok.
✔ Open graph metadata ok.
✔ Articles metadata ok.
✔ Reference metadata ok.
── Initialising site ───────────────────────────────────────────────────────────
── Building home ───────────────────────────────────────────────────────────────
Reading CODE_OF_CONDUCT.md
Reading CONTRIBUTING.md
Reading LICENSE.md
Reading README.md
Writing `404.html`
── Building function reference ─────────────────────────────────────────────────
Reading man/build_site.Rd
Reading man/clear_cache.Rd
Reading man/init_site.Rd
Reading man/pkgdown.offline-package.Rd
── Building articles ───────────────────────────────────────────────────────────
Reading vignettes/pkgdown.offline.Rmd
Reading vignettes/update.Rmd
── Building news ───────────────────────────────────────────────────────────────
── Building sitemap ────────────────────────────────────────────────────────────
── Building docs for llms ──────────────────────────────────────────────────────
The extension definition_lists is not supported for gfm
Error:
! in callr subprocess.
Caused by error in `map(.x, .f, ..., .progress = .progress)`:
! ℹ In index: 1.
Caused by error:
! pandoc document conversion failed with error 23
ℹ See `$stderr` for standard error.
Type .Last.error to see the more details.
> .Last.error
<callr_error/rlib_error_3_0/rlib_error/error>
Error:
! in callr subprocess.
Caused by error in `map(.x, .f, ..., .progress = .progress)`:
! ℹ In index: 1.
Caused by error:
! pandoc document conversion failed with error 23
ℹ See `$stderr` for standard error.
---
Backtrace:
1. pkgdown::build_site()
2. pkgdown:::build_site_external(pkg = pkg, examples = examples, run_dont_run = run_dont_run, ...
3. callr::r(function(..., cli_colors, hyperlinks) { ...
4. callr:::get_result(output = out, options)
5. callr:::throw(callr_remote_error(remerr, output), parent = fix_msg(remerr[[3]]))
---
Subprocess backtrace:
1. pkgdown::build_site(...)
2. pkgdown:::build_site_local(pkg = pkg, examples = examples, run_dont_run = run_dont_run, ...
3. pkgdown::build_llm_docs(pkg)
4. purrr::walk(paths, function(path) { ...
5. purrr::map(.x, .f, ..., .progress = .progress)
6. purrr:::map_("list", .x, .f, ..., .progress = .progress)
7. purrr:::with_indexed_errors(i = i, names = names, error_call = .purrr_error_call, ...
8. base::withCallingHandlers(expr, error = function(cnd) { ...
9. purrr:::call_with_cleanup(map_impl, environment(), .type, .progress, ...
10. local .f(.x[[i]], ...)
11. pkgdown:::convert_md(src_path, dst_path, full_url(pkg, path))
12. rmarkdown::pandoc_convert(input = path, output = dst_path, from = "html", ...
13. rmarkdown:::stop2("pandoc document conversion failed with error ", result)
14. base::stop(..., call. = FALSE)
15. | base::.handleSimpleError(function (cnd) ...
16. local h(simpleError(msg, call))
17. cli::cli_abort(message, location = i, name = name, parent = cnd, ...
18. | rlang::abort(message, ..., call = call, use_cli_format = TRUE, ...
19. | rlang:::signal_abort(cnd, .file)
20. | base::signalCondition(cnd)
21. global (function (e) ...
Note that pandoc < 3.1.2 does not have arm64 binaries on macOS, so an x86 system is needed to reproduce this issue.
Metadata
Metadata
Assignees
Labels
No labels