rstudio / blogdown

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

Not seeing archetypes suggestions in the new_post add-in #670

Closed atakanekiz closed 2 years ago

atakanekiz commented 2 years ago

Hello, thanks for the great package. I'm using blogdown v1.6.5, hugo 0.89.4, and following the Up & running with blogdown in 2021 tutorial involving Wowchemy-Starter Academic theme.

I'm running into an issue that awfully seemed awfully similar to #350 and #263, which should have been previously resolved. Briefly, when using the new_post add-in, I don't see any available archetype selections, and the post is created with the default archetype. The theme is organized in a way that only the default.md archetype is under the first level of the archetypes folder, and the other ones are nested in subdirectories. Can you help me understand what I'm missing here?

I tried creating the post from the console using the new_post() function, but I didn't know how to specify the kind argument to point to the right archetype. Any help is appreciated.

Many thanks

yihui commented 2 years ago

Could you provide a reproducible example as requested by the issue guide? Thanks!

atakanekiz commented 2 years ago

Thanks for the quick turnaround. I didn't know exactly how to make a reprex for this, but I'm attaching what I get below. I hope it helps.

Please note the empty Archetype box here. Clicking doesn't populate any suggestions either

image

When I create a new publication using new_post() function (code below), the front matter I get is attached:

new_post(title = "test_publication", 
         kind = "publication", 
         subdir = "../en/publication",
         ext = ".md")

image

When I create a new post using new_post() function, this is what I get:

new_post(title = "test_post", 
          kind = "post", 
          subdir = "../en/post",
          ext = ".md")

image

Session info

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=Turkish_Turkey.1254  LC_CTYPE=Turkish_Turkey.1254   
[3] LC_MONETARY=Turkish_Turkey.1254 LC_NUMERIC=C                   
[5] LC_TIME=C                      
system code page: 1252

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

other attached packages:
[1] shiny_1.7.1    blogdown_1.6.5

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7       rstudioapi_0.13  knitr_1.36       magrittr_2.0.1  
 [5] xtable_1.8-4     R6_2.5.1         rlang_0.4.12     fastmap_1.1.0   
 [9] tools_4.1.2      xfun_0.28.8      miniUI_0.1.1.1   jquerylib_0.1.4 
[13] htmltools_0.5.2  ellipsis_0.3.2   yaml_2.2.1       digest_0.6.29   
[17] lifecycle_1.0.1  bookdown_0.24    later_1.3.0      sass_0.4.0      
[21] promises_1.2.0.1 cachem_1.0.6     evaluate_0.14    mime_0.12       
[25] rmarkdown_2.11   compiler_4.1.2   bslib_0.3.1      jsonlite_1.7.2  
[29] httpuv_1.6.3 

In both cases, the front matter that is created is just the default. This is how the archetypes folder look:

fs::dir_tree(path = "themes/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5/archetypes/")

themes/github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5/archetypes/
+-- authors
|       +-- _index.md
|        \-- avatar.jpg
+-- book.md
+-- default.md
+-- event
|         \-- index.md
+-- home.md
+-- post
|         \-- index.md
+-- project
|         \-- index.md
+-- publication
|         \-- index.md
\-- slides
           \-- index.md
yihui commented 2 years ago

Should be fixed now. Thanks for the report! You can install the development version via

remotes::install_github('rstudio/blogdown')