Hacker News new | past | comments | ask | show | jobs | submit login

A number of our portfolio sites (including http://piaustralia.com.au ) are static html hosted on AWS S3 + Cloudfront.

The sites are created using Middleman[1], a ruby static site generator which I've found to be a little bit more flexible than Jekyll.

On our static sites, we grab inventory information as JSONP from a small Sinatra based service on Elastic Beanstalk with read only access to the DB. Other than this and the checkout (we'll get to that in a bit), everything is client side Javascript utilising local storage for the cart state.

We do not host our own checkout. Instead we use Shopify's ancient and way under-publicised "Cart Links"[2] feature. Cart Links let you pre-populate a cart and send the user to the checkout if you so wish.

To upload the static files to S3 we use an awesome program called S3_website which knows how to look for the rendered html from a number of static site generators, and sync it to S3. It's also smart enough to setup redirects, invalidate CDN caches and even gzipping content. It's freaking amazing[3].

[1] Middleman - https://middlemanapp.com

[2] Shopify Cart Links - https://help.shopify.com/themes/customization/cart/use-perma...

[3] S3_website - https://github.com/laurilehmijoki/s3_website




All my small sites are hosted on S3. It's perfect for them! They are all built on Jekyll but I'll check Middleman out


Any good recommendations on setting S3 links for public access? (permissions wise)


I'd just use Netlify. Ever since they've changed their pricing to have basic static sites for free, I'm sold on them and like them a lot.


If you want to go the Google route instead, you can do the same thing with them: https://cloud.google.com/storage/docs/hosting-static-website

I setup a Hugo site using that exact guide.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: