Closed TimDominikMaurer closed 4 years ago
@TimDominikMaurer try this now:
blogdown::new_site(theme = "wowchemy/starter-academic")
@erikriverson thanks for the post! Maybe @yihui also have some suggestions?
I am having trouble with generating a new site with blogdown
, and also with rendering old sites I have generated using the hugo-academic theme. I posted my issue on stackoverflow 2 days ago: https://stackoverflow.com/questions/63931103/hugo-academic-website-rendered-unformatted-using-blogdownserve-site
I successfully used blogdown::new_site(theme = "wowchemy/starter-academic", dir = "/Users/luna/my_site")
to generate a new site, as you suggested. However, doing blogdown::serve_site()
is giving me:
Error: Error building site: "/Users/luna/my_site/content/home/demo.md:39:1": failed to extract shortcode: template for shortcode "alert" not found
I also tried reinstalling the theme with
blogdown::install_theme(theme = "wowchemy/wowchemy-hugo-modules", force = TRUE)
but the same error appears.
I sense that my hugo academic theme installation is failing but I don't know what to do next. Would you have any suggestions? I know you are busy people, I really appreciate any thought you could have on this. Thanks in advance!
@LunaSare From your site's directory, try
hugo mod get github.com/wowchemy/wowchemy-hugo-modules/wowchemy
You will need the Go binary installed for your operating system for this to work.
Please try the official installation guide.
The official installation instructions are here: https://wowchemy.com/docs/install/ To edit on PC see the official guide at https://wowchemy.com/docs/install-locally/
Note there are reports from other Blogdown users with the alternative blogdown::new_site
approach you are using that Blogdown might be buggy and not fully support recent versions of Hugo, specifically Hugo Modules and monorepo module functionality. If you were to try installing via Blogdown rather than the official approach, the command would be something like blogdown::new_site(dir = "website",theme="wowchemy/wowchemy-hugo-modules/wowchemy")
- consider reporting any Blogdown bugs in the Blogdown Github repo.
@TimDominikMaurer @LunaSare @erikriverson I'll appreciate it if you could try the development version of blogdown, in which I have tried to provide a fix:
remotes::install_github('rstudio/blogdown')
The original command blogdown::new_site(theme = "gcushen/hugo-academic")
should work now.
If you were to try installing via Blogdown rather than the official approach, the command would be something like
blogdown::new_site(dir = "website",theme="wowchemy/wowchemy-hugo-modules/wowchemy")
- consider reporting any Blogdown bugs in the Blogdown Github repo.
@gcushen That won't work. new_site()
doesn't support theme = "user/repo/subfolder"
.
I still need to learn more about this new "Hugo modules". It might be great for theme or Go developers, but from the perspective of an average user, I feel it's a rather unfortunate decision to move to Hugo modules, because it requires Go and GIT if we want to preview or edit the site locally. One of the greatest advantage of Hugo used to be that it is a single binary without dependencies. Now with Hugo modules, this is no longer true.
Anyway, that's just my 2 cents. I'll just follow your steps (and Hugo's) and try to accommodate these changes on my side as quickly as possible. Thanks!
Thanks @yihui, installing the development version of blogdown fixed it!
Fyi, the site was rendering correctly once published, it just wasn't rendering locally with serve_site()
.
Thought I'd mention it in case it is useful information for anyone.
@LunaSare Great! Please feel free to file an issue to the blogdown repo to describe the problem with serve_site()
in more detail. Thank you!
This issue has been automatically marked as stale because it has not had any recent activity. The resources of the Academic team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically close soon if no further activity occurs. Thank you for your contributions.
Whenever I am trying to run
blogdown::new_site(theme = "gcushen/hugo-academic")
in RStudio I get the following Error:Do you have an idea how I can solve this problem? Thanks in advance