Live data from Hacker News

Deploying a Static Blog with Continuous Integration

loxodrome.io

11–18 of 18 posts

Re: Deploying a Static Blog with Continuous Integration

#12
post #9

Although the site generation software here is Hugo it could easily be another provider such as Jekyll. The web server will be hosted on a Digital Ocean droplet running Nginx, and CircleCI will be used for for the continuous integration (often abbreviated to simply “CI”) It's just a blog. Why is this better than running Wordpress, perhaps with a caching server in front if the traffic is heavy enough?

Security and ease of deployment. If your "blog" is just a bunch of auto-generated HTML pages then there is no database to worry about or WordPress install to keep up to date. You won't get hacked because you installed a plugin with a bunch of bugs in it.

Re: Deploying a Static Blog with Continuous Integration

#13
post #9

Although the site generation software here is Hugo it could easily be another provider such as Jekyll. The web server will be hosted on a Digital Ocean droplet running Nginx, and CircleCI will be used for for the continuous integration (often abbreviated to simply “CI”) It's just a blog. Why is this better than running Wordpress, perhaps with a caching server in front if the traffic is heavy enough?

* Secure by default, you only have to keep your web server up to date or host externally

* As fast as it gets without complex caching setup

* Everything is nicely in version control instead of a SQL database (which also is used in a very messy way in case of Wordpress), edit with your favorite editor, no slow and clunky web interface with a subpar editor

Re: Deploying a Static Blog with Continuous Integration

#14
post #9

Although the site generation software here is Hugo it could easily be another provider such as Jekyll. The web server will be hosted on a Digital Ocean droplet running Nginx, and CircleCI will be used for for the continuous integration (often abbreviated to simply “CI”) It's just a blog. Why is this better than running Wordpress, perhaps with a caching server in front if the traffic is heavy enough?

[deleted]

Re: Deploying a Static Blog with Continuous Integration

#15
post #9

Although the site generation software here is Hugo it could easily be another provider such as Jekyll. The web server will be hosted on a Digital Ocean droplet running Nginx, and CircleCI will be used for for the continuous integration (often abbreviated to simply “CI”) It's just a blog. Why is this better than running Wordpress, perhaps with a caching server in front if the traffic is heavy enough?

Another advantage is you can put your _entire_ website on a CDN provider like Cloudflare, because the whole site is static. This means my server can die completely, but Cloudflare can still keep on serving my site, and my readers have no idea of my ineptitude.

You can do this even with Cloudflare's free tier - no need to rely primarily on adding more VPS instances/load-balancing to 'scale' your static site - the CDN can help take care of this. I've recently moved my Jekyll based blog to the cheapest VPS instance I could find, and use CloudFlare to handle the load (not that it has much in the way of readers...).

Re: Deploying a Static Blog with Continuous Integration

#16
post #15
post #9

Although the site generation software here is Hugo it could easily be another provider such as Jekyll. The web server will be hosted on a Digital Ocean droplet running Nginx, and CircleCI will be used for for the continuous integration (often abbreviated to simply “CI”) It's just a blog. Why is this better than running Wordpress, perhaps with a caching server in front if the traffic is heavy enough?

Another advantage is you can put your _entire_ website on a CDN provider like Cloudflare, because the whole site is static. This means my server can die completely, but Cloudflare can still keep on serving my site, and my readers have no idea of my ineptitude. You can do this even with Cloudflare's free tier - no need to rely primarily on adding more VPS instances/load-balancing to 'scale' your static site - the CDN…

be careful relying on that though.. Each pop has it's own cache, and when there's a miss, it'll hit your server.

Its pretty rare that a CDN gives you any insight into their caches, and there's no guarantee a file is kept in the cache. A file can be removed from the cache for many reasons--cache filled; file not popular enough; etc.

So even if your local pop is saying the file is cached.. the other pops may not have any files for your website at all... or might be missing parts of the page (images, etc). (The x-cache header only indicates the status of the file at the pop that served the request -- not all pops.)

Re: Deploying a Static Blog with Continuous Integration

#17
A brilliant solution to deploy static website is using Firebase Hosting. Works brilliantly - provisions free certificates, and is fairly easy to do. deployment is a question of writing a json file and using firebase cli to run deploy. You get all the advantages of Google CDN, etc. Also a cool feature is rollbacks, where you can go back to a previous version of the website.

The biggest problem is firebase cli - I really wish they had built a static binary using golang (firebase is a Google division after all). The dependencies in firebase cli are sometime broken, etc.

Post reply on HN