rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 334 forks source link

Error building site with hugo-apero theme #767

Closed aginiguez19 closed 1 month ago

aginiguez19 commented 1 month ago

I am following these instructions for creating a blogdown site with Hugo Apéro.

So, in RStudio, I created a new project from github and then:

library(blogdown)
new_site(theme = "hugo-apero/hugo-apero", 
         format = "toml",
         sample = FALSE,
         empty_dirs = TRUE)

This appears to work fine, and then I am asking if I want to preview the site, and I say yes. This results in the error message:

► Want to serve and preview the site now? (y/n) y
Launching the server via the command:
  /Users/abraham/Library/Application Support/Hugo/0.134.2/hugo server --bind 127.0.0.1 -p 4321 --themesDir themes --theme hugo-apero -D -F --navigateToChanged
Error: Failed to serve the site; see if blogdown::build_site() gives more info.

Then doing as suggested:

> blogdown::build_site()
WARN  deprecated: site config key paginate was deprecated in Hugo v0.128.0 and will be removed in a future release. Use pagination.pagerSize instead.
Start building sites … 
hugo v0.134.2-1c74abd26070b0c12849550c974a9f3f1e7afb06+extended darwin/amd64 BuildDate=2024-09-10T10:46:33Z VendorInfo=gohugoio

ERROR [en] REF_NOT_FOUND: Ref "/02-postcards": "/Users/abraham/Desktop/website/content/collection/day01/03-distill/index.md:93:23": page not found
Total in 662 ms
Error: error building site: logged 1 error(s)

check_site() did not reveal any issues

> xfun::session_info('blogdown')
R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS Sonoma 14.6.1, RStudio 2024.4.2.764

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3   blogdown_1.19     bookdown_0.40     bslib_0.8.0       cachem_1.1.0      cli_3.6.3        
  digest_0.6.37     evaluate_0.24.0   fastmap_1.2.0     fontawesome_0.5.2 fs_1.6.4          glue_1.7.0       
  graphics_4.4.1    grDevices_4.4.1   highr_0.11        htmltools_0.5.8.1 httpuv_1.6.15     jquerylib_0.1.4  
  jsonlite_1.8.8    knitr_1.48        later_1.3.2       lifecycle_1.0.4   magrittr_2.0.3    memoise_2.0.1    
  methods_4.4.1     mime_0.12         promises_1.3.0    R6_2.5.1          rappdirs_0.3.3    Rcpp_1.0.13      
  rlang_1.1.4       rmarkdown_2.28    sass_0.4.9        servr_0.31        stats_4.4.1       tinytex_0.53     
  tools_4.4.1       utils_4.4.1       xfun_0.47         yaml_2.3.10      

Hugo version: 0.134.2
yihui commented 1 month ago

Thanks for the report! Please re-create the site or apply the fix https://github.com/hugo-apero/hugo-apero/commit/b4f648b9412e4ef9184608d917cd171bb3a22cf7 to your existing site.