Failed to extract shortcode

Hi am new with Hugo. I closely followed the instructions (https://sourcethemes.com/academic/docs/install/) to install it using RStudio. When I click on “Build website”:

==> rmarkdown::render_site(encoding = ‘UTF-8’)
Rendering content/post/2015-07-23-r-rmarkdown.Rmd
Building sites … Total in 12 ms
Error: Error building site: “/Users/gattuso/not_synced/web_site/content/slides/example-slides.md:75:5”: failed to extract shortcode: template for shortcode “fragment” not found

Output created: public/index.html

What should I do?

Thanks in advance

Without seeing your code, I’d guess either (1) you’re using a shortcode that isn’t defined, or (2) you don’t have the theme installed, so hugo does not “see” the shortcode

1 Like

I realise that I have not given enough information. I am just trying to get the Academic theme for Hugo up and running. I closely follow the instructions (https://sourcethemes.com/academic/docs/install/) and get the following error when I click on “build” in Rstudio:
Error: Error building site: “/Users/gattuso/not_synced/web_site/content/slides/example-slides.md:75:5”: failed to extract shortcode: template for shortcode “fragment” not found

Thanks

@gattuso Fragment exists so this is a sign that the theme is not fully installed.

I suggest checking the value of theme in your config.toml. It should point to the name of the theme that you downloaded to your themes folder. If Blogdown installed Academic to themes/hugo-academic but the theme field in config.toml points to just academic, then you need to rename your themes/hugo-academic folder to themes/academic and restart Hugo.

@neutreno Spot on! I am now all set, thanks a lot for your wonderful help!

Hey neutreno, Even I’m facing the same shortcode extraction error my theme in config.toml is pointing to themes/academic. Please, help me regarding this issue