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

new_post() with bundle archetype does not work #577

Closed
6 tasks done
maelle opened this issue Jan 28, 2021 · 2 comments
Closed
6 tasks done

new_post() with bundle archetype does not work #577

maelle opened this issue Jan 28, 2021 · 2 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@maelle
Copy link
Contributor

maelle commented Jan 28, 2021

My issue might be related to #436

We had a setup where using the New Post add-in worked, for creating a leaf bundle with a post called index.Rmd, and now it longer does.

Here's a repo reproducing the behavior https://github.com/maelle/addintest

  • I created a blogdown website from RStudio menu
  • I tweaked the .Rprofile a bit
options(blogdown.new_bundle = TRUE)
options(blogdown.subdir = "post")
options(blogdown.title_case = TRUE)
  • I added an archetype https://github.com/maelle/addintest/blob/master/archetypes/Rmd/index.md

  • I ran blogdown::new_post("lala", ext = ".Rmd", kind ="Rmd/")

      Error in file(con, "r") : impossible d'ouvrir la connexion
      De plus : Warning messages:
      1: In file(con, "r") :
        'raw = FALSE' but '/home/maelle/Documents/ropensci/addintest/content/post/2021-01-28-lala' is not a regular file
      2: In file(con, "r") :
        cannot open file '/home/maelle/Documents/ropensci/addintest/content/post/2021-01-28-lala': it is a directory
      Backtrace:
       1. blogdown::new_post("lala", ext = ".Rmd", kind = "Rmd/")
       2. blogdown::new_content(file, kind, FALSE)
       3. blogdown:::hugo_convert_one(file2)
       6. base::readLines(file, 1)
       7. base::file(con, "r")

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:

  • formatted your issue so it is easier for us to read?

  • used blogdown::check_site() function to verify your current project and followed all advices ?

  • included a minimal, self-contained, and reproducible example?

  • pasted the output from xfun::session_info('blogdown') in your issue?

  • upgraded all your packages to their latest versions (including your versions of R, the RStudio IDE, and relevant R packages)?

  • installed and tested your bug with the development version of the blogdown package using remotes::install_github('rstudio/blogdown')?

@maelle maelle added the bug an unexpected problem or unintended behavior label Jan 28, 2021
@yihui yihui closed this as completed in ef9468e Feb 3, 2021
@yihui
Copy link
Member

yihui commented Feb 3, 2021

The new_post() didn't work, and it was a bug indeed.

The "New Post" addin worked, but it shouldn't have, because new_post() was buggy. It was also bug.

Now both bugs should be fixed. Thanks for the report!

@maelle
Copy link
Contributor Author

maelle commented Feb 4, 2021

Yay, thank you! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants