Integrating Snipcart with Hugo

Hey guys, stumbled upon Hugo and found it so awesome that we decided to do an integration with Snipcart, the e-commerce startup where I work at. Thought some might like it, especially if you’re looking into handling e-commerce on your static site! Here is the link to the post:

Nice. But there seem to be a small error in there:

Okay now, let’s set up our products: a Klingon dictionary and a phaser.
Go to the data folder and create a new “products” folder.

With that I guess this will fail:

{{ range $ }}

Thanks for letting us know! We thought that store folder was unnecessary so we removed it but we forgot to adjust the code snippet. It’s fixed now!

It might also be worth mentioning that it would also be viable to put all the products into products.toml instead of one product per file.

But a clean and nice write-up. Now I’m thinking about what to start to sell :slight_smile:

1 Like

Good idea, we’ll probably look into updating the post later on! Just to give you an idea, we wrote the post, installed Hugo and deployed it on Netlify in about an hour :wink: Thanks for the feedback though!


The old URL is gone. Use this: