Can anybody help me rectify the mistakes I'm doing in this r code in Blogdown

> library(blogdown)
> library(devtools)
> new_site('gcushen/hugo-academic')
Congratulations! Your new Hugo site is created in C:\Users\MOHANKRISHNA\Documents\Sample\kripal\gcushen\hugo-academic.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
trying URL 'https://github.com/yihui/hugo-lithium/archive/master.zip'
downloaded 117 KB

processing 7 content files
Error: module "academic" not found; either add it as a Hugo Module or store it in "C:\\Users\\MOHANKRISHNA\\Documents\\Sample\\kripal\\themes".: module does not exist
Error: module "academic" not found; either add it as a Hugo Module or store it in "C:\\Users\\MOHANKRISHNA\\Documents\\Sample\\kripal\\themes".: module does not exist
The system cannot find the path specified.
Error in shell(cmd, mustWork = TRUE, intern = intern) : 
  '"C:\Users\MOHANKRISHNA\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" --themesDir themes -t academic' execution failed with error code 1
> serve_site()
Error: module "academic" not found; either add it as a Hugo Module or store it in "C:\\Users\\MOHANKRISHNA\\Documents\\Sample\\kripal\\themes".: module does not exist
Error: module "academic" not found; either add it as a Hugo Module or store it in "C:\\Users\\MOHANKRISHNA\\Documents\\Sample\\kripal\\themes".: module does not exist
The system cannot find the path specified.
Error in shell(cmd, mustWork = TRUE, intern = intern) : 
  '"C:\Users\MOHANKRISHNA\AppData\Roaming\Hugo\hugo.exe" -b / -D -F -d "public" --themesDir themes -t academic' execution failed with error code 1

Know that you need Blogdown >= 0.55 - I don't know your version but it may be related. Can you check ?

Also, you may be interested in this resources because there was a bug with blogdown and academic teams

Slides with a command for academic theme

new_site(theme = "gcushen/hugo-academic", 
         sample = TRUE, 
         theme_example = TRUE, 
         empty_dirs = TRUE,
         to_yaml = TRUE)

https://sourcethemes.com/academic/docs/install/#install-with-rstudio

1 Like

Hi, I was able to fix it, but thanks though for your response:)

Glad you manage to fix it !

Do not hesitate to post your fix next time so that other can have the answer.
Also, you'll be able to mark a solution and so show the community this post is answered :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.