gohugoio / hugoBasicExample

MIT License
281 stars 281 forks source link

Failed to extract shortcode: template for shortcode "math" not found #50

Closed EmielH closed 5 years ago

EmielH commented 5 years ago

The build for my theme Tale when using the Hugo Basic Example site is currently failing with the following error:

Error: Error building site: "/home/travis/build/EmielH/tale-hugo/hugoBasicExample/content/post/math-typesetting.mmark:28:5": failed to extract shortcode: template for shortcode "math" not found

When building locally, I get different errors (although the site does work when using hugo serve).

2019/04/09 20:52:32 mmark: failed: ` if or .Params.math .Site.Params.math ': open  if or .Params.math .Site.Params.math : The system cannot find the file specified.
2019/04/09 20:52:32 mmark: failed: ` partial "math.html" . ': open  partial "math.html" . : The filename, directory name, or volume label syntax is incorrect.
2019/04/09 20:52:32 mmark: failed: ` end ': open  end : The system cannot find the file specified.
2019/04/09 20:52:32 mmark: failed: ` if or .Params.math .Site.Params.math ': open  if or .Params.math .Site.Params.math : The system cannot find the file specified.
2019/04/09 20:52:32 mmark: failed: ` partial "math.html" . ': open  partial "math.html" . : The filename, directory name, or volume label syntax is incorrect.
2019/04/09 20:52:32 mmark: failed: ` end ': open  end : The system cannot find the file specified.

Tale doesn't have its own exampleSite and also doesn't include this shortcode. This repository also doesn't seem to contain this shortcode.

Is there anything I need to do to make the build work again, or is this an error in the Hugo Basic Example?

onedrawingperday commented 5 years ago

The Hugo Themes Site only uses content from this repository. Also the HugoBasicExample does not provide any layout templates. However Inline Shortcodes are enabled and used in the content files for illustrative purposes. This feature was introduced in Hugo 0.52 and as a result you need to use that or a higher version.

If the above does not solve the issue then please open a support ticket in the forum also make sure to read the guidelines for requesting help.

EmielH commented 5 years ago

Thanks for the info! The TravisCI error message occurs with Hugo 0.51 and older - I did not know about the inline shortcodes. However, I used Hugo 0.55 when building locally. I will look into this a little bit further.