0

We are deciding which JAM stack static site generation solution we should go for, and one of the main deciding factors is ability to use short codes for creating rich content.

We need to be able to use custom and / or predefined short codes such as quote, figure, youtube video, etc. in our content that get transformed to a particular HTML output.

That means that when writing body, our content editors can use custom tags, such as <youtube video-id="379232"> that get transformed to an appropriate HTML output.

How are other static site generators handling this aspect? From what I have seen so far, Go Hugo is handing it well with their shortcodes, but I would be curious how other solutions are approaching this problem.

As a reference, here's the link to the Hugo's shortcodes:

https://gohugo.io/content-management/shortcodes/

all jazz
  • 2,007
  • 2
  • 21
  • 37
  • Not sure what you mean by short codes. Like a react component? – ksav Jan 09 '19 at 13:34
  • @ksav I edited the post. To be more precise, please check Hugo's shortcodes: https://gohugo.io/content-management/shortcodes/ – all jazz Jan 09 '19 at 14:05
  • I see. My best guess is that you would want to look here for gatsby: https://using-remark.gatsbyjs.org/custom-components/ – ksav Jan 09 '19 at 14:57
  • Hugo shortcodes are equivalent to Jekyll _include files where you can pass in parameters to do the same thing as the youtube shortcode. Most of the static site generators do just about the same things, so its really up to personal preference. I switched from Jekyll to Hugo recently and haven't regretted it. If you are familiar with React gatsby might be a great choice. – I. Johnson Jan 10 '19 at 22:04

0 Answers0