rstudio / blogdown

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

Upside down page when compiling gcushen/hugo-academic #728

Closed oushujun closed 2 years ago

oushujun commented 2 years ago

Hello,

I tried to start a blogdown new project in RStudio using the hugo theme gcushen/hugo-academic but encounter the following errors:

― Creating your new site
| Installing the theme gcushen/hugo-academic from github.com
trying URL 'https://github.com/wowchemy/starter-hugo-academic/archive/HEAD.tar.gz'
downloaded 1.8 MB

trying URL 'https://github.com/wowchemy/wowchemy-hugo-themes/archive/HEAD.tar.gz'
downloaded 25.6 MB

Error: module "github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-reveal" not found; either add it as a Hugo Module or store it in "/Users/oushujun/My Drive/study/OSU/test/test/themes".: module does not exist
Error in new_content(f2, open = FALSE) : 
  Failed to create the file 'post/2020-12-01-r-rmarkdown/index.en.Rmd'.
In addition: Warning message:
In system2(...) :
  running command ''/Users/oushujun/Library/Application Support/Hugo/0.102.3/hugo' new 'post/2020-12-01-r-rmarkdown/index.en.md' --themesDir themes -t starter-hugo-academic' had status 255
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

I then manually downloaded the template from https://github.com/wowchemy/starter-hugo-academic, unzipped it, and load it into RStudio as an existing project. It loaded normally and then I click serve site, the page showed up but upside down and mirrored. My RStudio menu also became upside down and mirrored:

image

I can stop the server with blogdown::stop_server(), but the addin menu is still shown upside down and mirrored. I have to restart the R session to get things back to normal. Can you help to find out what went wrong and how I can use gcushen/hugo-academic in blogdown?

Thanks, Shujun

oushujun commented 2 years ago

Not sure if it's a duplication of #638 because the issue in #638 seems solved in that thread.

yihui commented 2 years ago

For the wowchemy theme issue, it's a known one. I pinged its developer two weeks ago but didn't get a response: https://github.com/wowchemy/wowchemy-hugo-themes/commit/b49528cf1e812b0136be7f35540573b357c8c6b9#commitcomment-81429105 I'll see if I could fix it on my side. That said, we have often run into problems with wowchemy themes. You may see if you like the hugo-apero theme: https://github.com/hugo-apero/hugo-apero It should be much more stable.

For the RStudio issue, a quick google search led me to https://community.rstudio.com/t/install-r-studio-on-win8-my-studio-is-upside-down/80325 I'm not sure if it will solve your problem.

yihui commented 2 years ago

Should be fixed now:

remotes::install_github('rstudio/blogdown')

BTW, could you tell me where you heard about the gcushen/hugo-academic theme?

oushujun commented 1 year ago

Yes, it's fixed. Thank you very much! I heard about the gcushen/hugo-academic theme from your earlier CGM presentation. It was very helpful. Thanks!

Shujun