rstudio / blogdown

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

Error in blogdown::new_site() #730

Closed Dagwbl closed 2 years ago

Dagwbl commented 2 years ago

Checklist

When filing a bug report, please check the boxes below to confirm that you have provided us with the information we need. Have you:

Description

An error occurred when I used blogdown::new_site():

> blogdown::new_site(theme="lxndrblz/anatole")
― Creating your new site
► The directory '.' is not empty. Create the site anyway? (y/n) y
| Installing the theme lxndrblz/anatole from github.com
trying URL 'https://github.com/lxndrblz/anatole/archive/HEAD.tar.gz'
Content type 'application/x-gzip' length unknown
downloaded 1.9 MB

Error in dir.exists(x) : invalid filename argument

And change the theme to yihui/hugo-ivy as similar error.

blogdown::check_site() output

> blogdown::check_site()
― Running a series of automated checks for your blogdown website project...
-------------------------------------------------------------------------------------------
○ A successful check looks like this.
● [TODO] A check that needs your attention looks like this.
| Let's check out your blogdown site!
-------------------------------------------------------------------------------------------
― Checking config/_default/config.toml
| Checking "baseURL" setting for Hugo...
● [TODO] Set "baseURL" to "/" if you do not yet have a domain.
| Checking "ignoreFiles" setting for Hugo...
● [TODO] Set "ignoreFiles" to ["\\.Rmd$", "\\.Rmarkdown$", "_cache$"]
| Checking setting for Hugo's Markdown renderer...
○ All set! Found the "unsafe" setting for goldmark.
― Check complete: config/_default/config.toml

― Checking index.Rmd in the root directory
● [TODO] index.Rmd is missing; create one with blogdown:::create_index().
― Check complete: index.Rmd

― Checking .gitignore
● [TODO] .gitignore was not found. You may want to add this.
― Checking Hugo
| Checking Hugo version...
○ Found 2 versions of Hugo. You are using Hugo 0.103.1.
| Checking .Rprofile for Hugo version used by blogdown...
| Hugo version not set in .Rprofile.
● [TODO] Use blogdown::config_Rprofile() to create .Rprofile for the current project.
● [TODO] Set options(blogdown.hugo.version = "0.103.1") in .Rprofile and restart R.
― Check complete: Hugo

― Checking netlify.toml...
● [TODO] netlify.toml was not found. Use blogdown::config_netlify() to create file.
― Checking content files
| Checking for validity of YAML metadata in posts...
● [TODO] Found invalid YAML metadata in the following files:

  content/english/post/rich-content.md (Reason: Parser error: did not find expected <document start> at line 6, column 1)

  Please fix the YAML metadata of these files.
| Checking for previewed content that will not be published...
○ Found 0 files with future publish dates.
○ Found 0 files marked as drafts.
| Checking your R Markdown content...
○ All R Markdown files have been knitted.
○ All R Markdown output files are up to date with their source files.
| Checking for .html/.md files to clean up...
○ Found 0 duplicate .html output files.
○ Found 0 incompatible .html files to clean up.
| Checking for the unnecessary 'content/' directory in theme...
○ Great! Your theme does not contain the content/ directory.
― Check complete: Content

xfun::session_info('blogdown') out put

> xfun::session_info('blogdown')
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621), RStudio 2022.7.1.554

Locale:
  LC_COLLATE=Chinese (Simplified)_China.utf8  LC_CTYPE=Chinese (Simplified)_China.utf8   
  LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C                               
  LC_TIME=Chinese (Simplified)_China.utf8    

Package version:
  base64enc_0.1.3  blogdown_1.12.4  bookdown_0.29    bslib_0.4.0      cachem_1.0.6    
  digest_0.6.29    evaluate_0.16    fastmap_1.1.0    fs_1.5.2         glue_1.6.2      
  graphics_4.2.1   grDevices_4.2.1  highr_0.9        htmltools_0.5.3  httpuv_1.6.6    
  jquerylib_0.1.4  jsonlite_1.8.0   knitr_1.40       later_1.3.0      magrittr_2.0.3  
  memoise_2.0.1    methods_4.2.1    mime_0.12        promises_1.2.0.1 R6_2.5.1        
  rappdirs_0.3.3   Rcpp_1.0.9       rlang_1.0.5      rmarkdown_2.16   sass_0.4.2      
  servr_0.24       stats_4.2.1      stringi_1.7.8    stringr_1.4.1    tinytex_0.41    
  tools_4.2.1      utils_4.2.1      xfun_0.33        yaml_2.3.5      

Hugo version: 0.103.1
Dagwbl commented 2 years ago

when I fix my proxy, it works.