Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarto articles, in the vignettes/articles/* sense, don't seem to work #2821

Open
jennybc opened this issue Nov 23, 2024 · 2 comments
Open

Comments

@jennybc
Copy link
Member

jennybc commented Nov 23, 2024

I'm working on making usethis::use_vignette() and usethis::use_article() work for .qmd. In that PR (r-lib/usethis#2085), I feel like I've got the right files going in the right places, etc., and .qmd vignettes (vignettes/*.qmd) seem fine. But when it comes time to build the site, I see problems with anything like vignettes/articles/*.qmd:

> pkgdown::build_site()
── Installing package abcde into temporary library ──────────────────────────────────────────────────────────────────────────
── Building pkgdown site for package abcde ─────────────────────────────────────
Reading from: /Users/jenny/tmp/abcde
Writing to: /Users/jenny/tmp/abcde/docs
── Sitrep ──────────────────────────────────────────────────────────────────────
✔ URLs ok.
✔ Favicons ok.
✔ Open graph metadata ok.
✔ Articles metadata ok.
✔ Reference metadata ok.
── Initialising site ───────────────────────────────────────────────────────────
── Building home ───────────────────────────────────────────────────────────────
Writing authors.html
Reading LICENSE.md
Writing LICENSE.html
Writing LICENSE-text.html
Reading DESCRIPTION
Writing index.html
Writing 404.html
── Building function reference ─────────────────────────────────────────────────
Writing reference/index.html
── Building articles ───────────────────────────────────────────────────────────
Writing articles/index.html
Reading vignettes/articles/rmarkdown-article.Rmd
Writing articles/rmarkdown-article.html
Reading vignettes/rmarkdown-vignette.Rmd
Writing articles/rmarkdown-vignette.html
Reading vignettes/articles/quarto-article.qmd
Reading vignettes/quarto-vignette.qmd
Running `quarto render`
Run `rlang::last_trace()` to see where the error occurred.
Error:
! ! in callr subprocess.
Caused by error in `.f(.x[[i]], .y[[i]], ...)`:
! No built file found for vignettes/articles/quarto-article.qmd
Hide Traceback
    ▆
 1. └─pkgdown::build_site()
 2.   └─pkgdown:::build_site_external(...)
 3.     └─callr::r(...)
 4.       └─callr:::get_result(output = out, options)
 5.         └─throw(callr_remote_error(remerr, output), parent = fix_msg(remerr[[3]]))

Trying to just build articles also falls over:

> pkgdown::build_articles()
── Building articles ────────────────────────────────────────────────────────────────────────────────────────────────────────
Reading vignettes/articles/quarto-article.qmd
Reading vignettes/quarto-vignette.qmd
Running `quarto render`
Run `rlang::last_trace()` to see where the error occurred.
Error in `.f()`:
! No built file found for vignettes/articles/quarto-article.qmd
Hide Traceback
     ▆
  1. └─pkgdown::build_articles()
  2.   └─pkgdown:::build_quarto_articles(pkg, quiet = quiet)
  3.     ├─pkgdown:::unwrap_purrr_error(...)
  4.     │ └─base::withCallingHandlers(...)
  5.     └─purrr::walk2(...)
  6.       └─purrr::map2(.x, .y, .f, ..., .progress = .progress)
  7.         └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
  8.           ├─purrr:::with_indexed_errors(...)
  9.           │ └─base::withCallingHandlers(...)
 10.           ├─purrr:::call_with_cleanup(...)
 11.           └─pkgdown (local) .f(.x[[i]], .y[[i]], ...)
 12.             └─cli::cli_abort("No built file found for {.file {input_file}}")
 13.               └─rlang::abort(...)

The toy package I'm working with: https://github.com/jennybc/abcde

In sleuthing around for packages that actually have vignettes/articles/*.qmd, I came across someone using their own fork and branch for qmd article rendering that I suspect is a workaround for what I'm seeing? 🤷‍♀️

https://github.com/ethanbass/pkgdown/tree/qmd_articles
ethanbass@8b10575

I poked around a couple of other hits and so far haven't come across any where it looks like things are "just working" for anyone with vignettes/articles/*.qmd*.

@jennybc
Copy link
Member Author

jennybc commented Nov 23, 2024

Yes I can personally attest to success with pkgdown::build_site() if I install pkgdown from the fork and branch mentioned above. They are definitely onto something promising.

@jennybc
Copy link
Member Author

jennybc commented Nov 23, 2024

Here's another toy package, that contains only a qmd article, also not able to build a pkgdown site: https://github.com/jennybc/fghij

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant