distill icon indicating copy to clipboard operation
distill copied to clipboard

distill::distill_article not working

Open Nicktz opened this issue 2 years ago • 1 comments

When running the following in Rstudio:

library(distill)
create_article("article.Rmd")

I get the error when trying to knit:

Error in yaml::yaml.load(..., eval.expr = TRUE) : 
  Scanner error: mapping values are not allowed in this context at line 3, column 9
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
Execution halted

It seems as though the "::" in output: distill::distill_article is causing offence in the yaml (not sure):

---
title: "Untitled"
description: |
  A new article created using the Distill format.
author:
  - name: Nora Jones 
    url: https://example.com/norajones
    affiliation: Spacely Sprockets
    affiliation_url: https://example.com/spacelysprokets
date: "`r Sys.Date()`"
output: distill::distill_article
---

It works when I remove the output specification (producing a vanilla html), or when I knit:

---
title: "Theory"
site: distill::distill_website
listing:
  posts:
    - 2021-08-04-session1
---

My session info:

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_South Africa.1252  LC_CTYPE=English_South Africa.1252    LC_MONETARY=English_South Africa.1252 LC_NUMERIC=C                         
[5] LC_TIME=English_South Africa.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] distill_1.2.4

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5                 pillar_1.4.6               compiler_4.0.2             forcats_0.5.0              tbl2xts_1.0.4              tools_4.0.2               
 [7] xts_0.12-0                 digest_0.6.25              downlit_0.2.1              lubridate_1.7.9            evaluate_0.14              lifecycle_0.2.0           
[13] tibble_3.0.3               lattice_0.20-41            pkgconfig_2.0.3            rlang_0.4.11               rstudioapi_0.11            yaml_2.2.1                
[19] RcppRoll_0.3.0             xfun_0.25                  dplyr_1.0.1                knitr_1.29                 generics_0.0.2             vctrs_0.3.2               
[25] rmsfuns_1.0.0.1            hms_0.5.3                  grid_4.0.2                 tidyselect_1.1.0           fmxdat_1.0.5               glue_1.4.1                
[31] R6_2.4.1                   rmarkdown_2.10             pacman_0.5.1               readr_1.3.1                purrr_0.3.4                tidyr_1.1.0               
[37] magrittr_1.5               scales_1.1.1               RiskPortfolios_2.1.4       ellipsis_0.3.1             htmltools_0.5.0            PerformanceAnalytics_2.0.4
[43] rsconnect_0.8.16           colorspace_1.4-1           quadprog_1.5-8             munsell_0.5.0              crayon_1.3.4               zoo_1.8-8 

Nicktz avatar Aug 12 '21 08:08 Nicktz