I really like forestry.io, which lets you choose the static site generator system and then host the generated static site on Github Pages or other static hosters.
It's basically the missing glue for the manual operations you would normally do on your own computer if you went the Jekyll/Hugo static site generator way. But you don't need to maintain a development environment on your machine.
After the initial setup, a non-developper can use forestry as easily as Wordpress.
As someone who's been building websites for 15 years, I can't say enough good things about this trend. I work primarily with early stage startups, often pre-product, building prototypes and V1s. The primary objective of the teams I work on is to validate product strategy, which requires moving quickly to de-risk initial development and iterate.
The past few years has completely changed the way I execute this strategy. Leaning heavily on products like these that allow us to develop software with very little or sometimes no code at all. It's nuts what you can build in a few days.
Discovering Rails in 2009 was the last big shift for me in this way, with tools like scaffolding to build out the skeleton of any dynamic CRUD section in a few seconds. Still, it wasn't uncommon to subsequently spend days or weeks getting specific sections of the site to reach parity with designs.
Some people talk about how this trend is a threat to web developers like me. While it's true that it's never been easier for anyone to build high-quality dynamic websites, that position completely overlooks the benefits for traditional web developers. This new toolchain is like having superpowers for a very specific type of development. Pairing that with solid knowledge of web fundamentals and the ability to "grow up" beyond the limitations of the system is a recipe for delivering work faster than ever before. For most early-stage startups, fast & cheap is #1, but if you can deliver quality on top of that, you're golden.
I'm currently using a Jekyll based theme to host my blog via GitHub pages. I'll most likely switch to static-site generator using zola [0]. I don't much know about web development, but fine with markdown based site generation. Was struggling with zola docs, until I found that I can simply clone themes [1] and replace the sample posts. I'll go through settings later. Best thing I like about zola is that I get a single binary (this is based on rust) and I don't have to fiddle with npm, etc.
I was coming here just to mention Zola, which we successfully use for two static websites of ours.
Zola is written in rust, has a single binary, great support for multilingual sites and a bunch of great features compared to other static website generator[1].
I had a quick look at Zola sometime ago while looking for alternatives to Hugo (which is written in Go, but is also distributed as a single binary). But it seemed like Zola had fewer themes available. As a non-designer, having great themes available (for free, preferably) would be a good starting point.
I wondered why you say _fewer_ themes for Zola, there were so many to choose from and I had a hard time to decide (and I might still change it in future).
I just checked for Hugo, and it certainly has so many more compared to Zola. Something to keep in mind for future, but I am more than satisfied with Zola for now.
I've recently jumped on the static bandwagon after being an early adopter and user of WordPress since CafeLog/0.71 days. What a blessing it has been.
I've taken two different approaches:
1. Maintain a local WordPress instance that builds the site using all the theme/plugin magic that WordPress is famous for, but have a static-export of that into Github -> Netlify.
2. Small sites being powered by Cloudflare Workers - using pure JS.
The jump to React.js / Vue / Go / Ruby et.al for an old PHP/HTML/CSS hack like me was too hard (and I tried them all!), so I settle for WordPress (the devil I know) for the build/back-end, and incorporate and embrace static on the front end. This separation is key - in my mind - for speed and security.
I've seen people say WordPress is the devil, but honestly, I have found if you want a simple blog, it works extremely well. I selfhost two WordPress instances with a LAMP stack on Debian (the hardware is literally in my basement), and the maintaince I do is log in maybe once a week to make sure that Debian/WordPress auto updated. Most of the time I don't even do that because Debian/WordPress email me to tell me it's updated.
I think one of WordPress' biggest issue is that I have not really found a good how to to really set it up (they advertise their "5 minute deploy", but it leaves a lot of things lacking). If I set it up, I have a series of articles I used to set it up.
The other issue I've anecdotally seen is when someone installs a bunch of plug ins then gets into a dependency hell when trying to update.
The people (probably like me) who would call WP the devil is people who have had to maintain 15 year old intertwined WP instances riddled with outdated portions of the platform, insecure hand-coded modifications, terribly functioning custom plugins, horrible data hygiene for exporting and re-appropriating content, and terrible, clunky infrastructure setups. WordPress makes all of those easier, and encourages them when it’s anything more than a simple blog or product page or something. It’s easy for new features to be requested and sold and horrible to sell fixing any of the above problems. It goes on deaf ears once people get used to the web products just being there. And once clients get used to the blog interface, you dare not recommend any change no matter how good for the business.
I’ve seen smart, talented people just give up in the face of that kind of monstrosity, shelve all their plans for improvement and just buy into the duct-tape patch jobs of yore and developing one-off plugins for every request because it’s fast and needed to be done yesterday because something else has been requested or broken.
After my rambling let me reiterate that Wordpress is great for its intended application. But it is horrible for the extrapolated purpose many companies and teams have bent, twisted, and surgically manipulated it to be used. It’s not Wordpress’s fault exactly. It’s those who’ve recommended wp as a tool to solve problems it wasn’t meant for, and industry that has built up around that to make it appear as if it’s a viable solution.
The one time I was brought on to a WordPress project, it was deployed via ftp and there was an ominous text file (not named Readme) in the root that said something like "we had to use a lot of symlinks to get things to work. Be careful deploying"
Wordpress has had a history of serious security vulnerabilities that gave it a bad rap for folks that have been following the industry for a long time. I think automattic has done a great job overall in improving Wordpress and you don't hear about mass defacements or easy hacks for the standard wordpress install anymore.
The plugin ecosystem however opens you up once again: here the devil is in the details. Every plugin you install might be the giant blinking red light that says: hack me, steal my data, etc.
On balance though wordpress is pretty good these days.
Part of the reason for highly visible security vulnerabilities in Wordpress is just a result of the massive user base. Heavily used platforms are naturally more heavily targeted by malicious users since they are easier to find, and exploits are more readily available.
In truth, most software at any given time probably has serious security vulnerabilities that just aren't as obviously exploitable, and I wouldn't say that the volume of published exploits related to Wordpress is indicative of a poorly managed or written piece of software.
I used "devil" in the context of the axiom "better the Devil you know..." - so while I understand and relate to much of the anti-WordPress commentary, I wouldn't call it "the Devil". Just to clarify!
Search and comments are the casualties of static-sites - unless you bow and crumble to the use of something 3rd party (Disqus or Google Site Search to name some poor examples)
staticman[0] for comments is a neat solution that avoids those surveillance companies. it can use heroku hobby tier for processing and github as the content backend for a free, hosted comments solution for static sites (fully acknowledging that heroku and github are both owned by other surveillers).
For a lot of situations something like jekyll search [0] works wonders. It basically generates a json file (you can customize it quite a bit). For even decently sized blogs it's quite quick and doesn't require a page refresh.
Can’t speak for GP, but I have a static site written in Gatsby. Yes (prepares boring-to-mention downvote armor) it is absolutely riddled with JavaScript. But if you want the ability to “search” without having a backend, Gatsby can do that.
But they assume some context, which I’ll give you: At compile time, Gatsby is capable of making a list of all the posts on your site that you can query with GraphQL (at compile time) or use in the JS of your pages. In fact, saying it makes a list of all “posts” is selling it short, because Gatsby can store and manipulate arbitrary data structures. So if you’ve got a Documentation site with a table of contents and three levels of content within it... that’s all queryable at compile time too. It’s extremely flexible.
Now, it’s not like your pages will actually be using GraphQL to query a DB when the user arrives on the page: all the data is basically “baked in” to the page when it is compiled. But for a static site where the “data” only changes when you add/change some content and recompile, this works really well.
We built a website for a film festival using a static site generator, deploying to AWS S3 + CloudFront Content Delivery Network. A few months later, the client asked about shutting it down to save money. Turns out it cost $0.05 for the month it was active, and $0.01 in the previous month.
It was a new AWS account for the client, which includes 50gb of CloudFront as part of the AWS Free Tier, so I guess it used that. I didn’t look into it a lot. As I joked with the client, it is cheaper to leave it running than pay us to turn it off.
Often I show people how to write simple HTML and CSS sites. They are usually just making simple single page sites but they are extremely satisfied by being able to do it themselves.
What is the simplest way to get these single file HTML sites hosted? Preferrably without having to teach another tool or language?
I'm working on a beginners computing course, and of all the self-host options for HTML and CSS, the easiest one is glitch.com. You can drag and drop files, edit code right there in a nice environment, and also get a subdomain that you like. Surge and Netlify on the other hand requires Terminal knowledge and requires npm installed. Glitch can all be done on the browser.
Netlify allows you to drag and drop a folder only using a browser. It works great for the output directory of static site generators or a set of hand-coded HTML files. No CLI required.
Neocities.org seems ideal for this. I personally use the free tier of netlify at the moment, but I'm considering switching to neocities instead since I just have simple personal stuff to serve and I like the neocities ethos.
The problem with beginners and S3, is that they can't handle the billing side. Both calculating (outbound? same region? edge location?) and monitoring if things go south. Beginners will prefer the site going down rather than paying extra.
Yeah, I use S3 myself for a static website (as well as podcast hosting and misc other stuff). But the lack of hard cost circuit breakers make me hesitant to recommend AWS in general to beginners for casual storage and hosting.
For true beginners even the easy single command might not be easy. You need to be familiar with the command line, you need to install the aws tool and hope that you don’t run into issues (often times if you’re on Windows installing command line tools can involve extra hoops for example), you need to navigate the AWS dashboard and get familiar with their unintuitive terminology (to host a site you need an “s3 bucket”), then you also need to create a key for your client and learn what a key is. Individually those tasks are not that difficult, but when you’re a beginner it adds up and quickly becomes intimidating.
A lot of our customers learnt basic HTML/CSS using it.
And it is something I wish existed 9 years ago when I first started learning HTML at university. Design is a huge barrier when learning HTML as everything looks terrible.
By using Bootstrap and a website builder you get to create great looking websites easily.
I have been really liking Github Pages as I learn HTML myself (not a developer). Not only is it (for static sites) but the Git workflow has given me the confidence to take more risks. If I make a mistake and break my webpage, I just revert the commit and no harm done!
I don't even truly know Git but easily got the hang of committing via Github's Desktop app GUI.
Odd not to mention services like Wix and Weebly and Squarespace, which is where most non-techie people wanting to self build a website would end up. Perhaps this post is aimed at the more technical end.
edit: Oh right self-serve means self-host, not just self-build.
The single big plus for me is, that it allows me (as a DEV) to provide the typical non-DEV user (aka my mother) with a simple, non markdown user interface to edit and update the page on her own.
Publii almost gets it right. There's still the issue of getting hosting, setting that up, managing it etc for non-tech people. Your use case is great, though.
Hosting a static website is not that difficult. The quickest way is to upload the zip file generated by Publii on the Netlify “drop” page. The domain configuration is more challenging than that.
I will be honest, I didn’t think Wordpress would last this long. However, there are some great (free) alternatives to getting a website up and running. Google Sites is one not mentioned in the article. It can handle basic needs for most people without technical skills. Speed is not the greatest however. With something like Tailwind CSS it’s very easy to create a static webpage to host on Github/Netlify.
I like Tailwind a lot, but for anyone else reading, you still need to purge css classes to not end up with a very large css file (187kB gzipped) [1]. This requires a build step with PurgeCSS. (I haven't checked, but maybe Netlify offers a build step that will do this for you...)
I also like Tachyons [2] for utility-based classes, which is pretty small (14kB gzipped).
Wordpress will probably outlast most of the alternatives mentioned in this thread, including every static site generator. It's too cheap, powerful, flexible and easy to use to disappear. Also, the Wordpress devs do actually make radical new changes to it to keep up with the times, like introducing the visual eidtor Gutenberg or moving towards a headless Wordpress.
Funny thing is, just a week ago I read that some people would say WP is "no code". I had the impression almost all of WP's success was based on countless web agencies coding customizations for it.
Page builders have come a long way, a lot of agencies will use something like Elementor now because designers can effectively build a lot of pages in real time as opposed to doing the traditional psd->custom theme route.
It's because there are countless plugins and whatnot that WP to a lot of people is a hassle free installation, similar to "no code", or at least very little code.
I've been rebuilding a couple of sites using https://11ty.dev lately and it's by far the best static site generator I've ever used, and I've used most of them. Everything I've tried to do has worked pretty much first time in exactly the way I'd have expected.
Been enjoying 11ty very much as well as of lately. Most of the things have worked for me first time around as well. One thing which has tripped me up has been the flexibility of the different template engines, and in what order files get processed during build when one mixes markdown, njk, liquid etc. That section is worth reading carefully in the manual. Other than that, simple as heck with very few constraints.
We (Almonit) focus on Dwebsite: websites that connect decentralized storage with decentralized name service. Works great at the moment without any server or 3rd party.
Apple should bring back iWeb. It was an easy way for non-technical people to design a web page as if they were creating a document in Pages. Sometimes all you need is a simple static page for yourself or for your small business.
I've been thinking about creating a spiritual successor to Frontpage and Dreamweaver for years. A good ol desktop program built for easy and fast publishing and app prototyping.
I feel like we’re at a point where a modern frontpage would work. Make it cross platform (including maybe a simple mobile version) and have it push static sites to Github Pages (with an option for other hosts). Integrate some domain purchasing and setup with info@domain redirecting to an email address of choice.
Squarespace but with an actual layout editor like Word.
On that topic, I am all in favor of static sites hosted on github. But the static site generators, the way I see it, weren't self-contained. That is, you still needed to go through a build process. And after a lot of poking around and digging about, I built(and subsequently open sourced) this[1]. Kind of a 1 hour coding-session kind of thing but for anyone out there looking for something entirely self-contained and stupid simple, there you are...
I really wanted to like Ghost but it seems out of touch. Like the only social media options by default are Twitter/Facebook, the plugin system is just zapier connections, themes are limited, and when I tried to self host because the official ghost hosting is expensive I only ran into bugs with it. After spending a week with Ghost I moved to Wordpress. I wish I could use the themes on Ghost with Wordpress because all of the ghost themes are what I want for my site. I want the nice parts of Ghost with a Wordpress backend.
WordPress has an official REST API. It's pretty easy to rip post/page content out of it either on a schedule (cron) or dynamically, in either case rendering finished pages from templates or similar, and serve it without involving WP directly. I'm not too familiar with static site generators but I'd expect any that can take raw HTML for post/page bodies to be trivial to automate to serve such a pipeline.
I too found the hosted Ghost platform expensive for personal use, and when I thought of self-hosting, I was discouraged from trying it by some people who know better. They said that Ghost's developers have focused on making it work on their hosting platform and that it's a bag of hurt (or soon turns into one) elsewhere. Sadly, I had to use WordPress even though I don't like the platform's security related issues and how its plugin systems can make users shoot themselves in the foot (on complexity, site speed, site stability and security exposure).
What I'm looking for is a lean and nice CMS that comes with some batteries included, and can generate good static sites and also work for dynamic ones.
If you are using any tool that stores its content in JSON, you can use https://frontaid.io/ for that. FrontAid is basically a CMS for JSON files. And based on that JSON content, you can then generate a static page or use it for whatever you want.
This isn't a solution for non-tech people, but I've really enjoyed making a blog that sort of sits in between database-backed and Jekyl/Hugo. Got the idea from Jose Valim's dashbit blog. Basically a folder of markdown files that gets parsed into memory on startup and then served dynamically from there.
A Go app that doesn't need to hit a database has response times nearly as fast as static, and you can still do things like including related content ("more like this") at the bottom of a post, or pagination/filtering on the index page.
Re: 'Headless CMS' in the article: Since the introduction of the JSON REST API, I've been using Wordpress as the back-end to various personal and professional projects, built on various web and native mobile frameworks.
One of the good things about Wordpress is the familiarity to it from the people who have to use it. (Authors/Editors/Contributors). (Though, I'd say Gutenburg might stir that up a bit).
Also, once you learn how to write plugins, the sky's the limit really.
A bit of a side-question for those using static site generators: how do you manage binary assets like images? I keep my Markdown, configuration files, etc. in git, but I don't want to put binary blobs into git. git-LFS seems to be an option, but it doesn't look like there's much support for self-hosting. For now, I'm rsyncing assets to the right place as part of the generation process, but There's Got To Be A Better Way.
While git isn't ideal for binary assets it is also true that adding random 10Gb images is bad for readers on bad network-links.
I just make sure that my images, and assets, aren't "too big" and add them to git. If they were >1Gb then I might reconsider, but the git-repository which contains my blog goes back to 1st January 2005 and is only ~50Mb in size so it hasn't been a real concern.
Git is not exactly well suited to having large blobs. If you change a single bit and git doesn't know how to diff it, you'll get a whole new version of the file, balooning repo size.
Maybe a longshot for your case, but Ghost[1] was developed as a simplified alternative to Wordpress. Their feature list[2] bring up several security-focused design choices.
The original idea of Ghost was made by John O'Nolan, then a lead dev at Wordpress Foundation.
Considering the title of the article and that it's only talking about self-hosted(-ish) solutions it feels very weird that it only mentions one CMS. I get that it says "I'll review my top choice to keep things simple", but CMS'es are probably the most common solution to what the article talks about and the title implies that it will be comprehensive.
I am currently using Hexo to generate my blog, then post processing (optimization) using gulp, and using CircleCI to build on push and publish to GitHub pages for me. Contents are just several Markdown files.
Is there any static website builders which make it easy to execute code at build time?
They all have a templating language, and sometimes I just wanna write a quick function to do something like read a file, chop something out and wrap it in some html -- something that would take 8 lines of Python.
I'll have a look -- I've previously tried Hugo, pelican and Jekyll and while pelican and Jekyll provide extensions, they just seem so heavyweight to write.
> You can self-host it on a small server (one-click deployment on a $5 VM on Vultr or DigitalOcean will do)
Having hosted a ghost blog before, this is the wrong way to think about it. You'd need to run a separate instance of a database which costs $15 on Lightsail with periodic backups.
Running the database instance on the same $5 machine is one disaster away from a lot of pain. It is so much better to use github pages or static page generators over Netlify, since a database really seems like an overkill for simpler blogs.
Someone wiser than me once said [0]: Why are you doing all this? Your entire database fits in RAM.
As a Ghost self-hoster, I can confirm I don't require the use of any database for "$15 on Lightsail with periodic backups".
Depending on your requirement you can use any instance of MySQL/MariaDB - managed or self-managed. You could run a separate $5 MariaDB DigitalOcean droplet. Ghost Foundation provides their 1-click Ghost droplet bundled with MySQL, but you're not restricted to it.
And yes, SQLite is also an option.
Suggesting a "need" to run fault-tolerant database operations doesn't quite concile with running it in RAM only.
> Suggesting a "need" to run fault-tolerant database operations doesn't quite concile with running it in RAM only.
The wisdom is: You don't need a database at all to avoid SPOF. Use static pages and let Netlify and others cache them in their CDNs world-wide ("RAM").
> Ghost Foundation provides their 1-click Ghost droplet bundled with MySQL.
It's a blog, not a mission critical site. I suspect MOST blogs get so few views that it really isn't a huge deal. If you have the need for more stability and availability, then paying extra isn't a huge deal.
You'd do better to take arguments at their merits than resort to ad hominem attacks.
To your point: Yes, Ghost is much more than Hugo / Jekyll will ever be, but then again, most people aren't building a News site to actually want the features Ghost has to offer.
I mean, there's absolutely a market for software like Ghost and WordPress (or they wouldn't exist, especially in WordPress' case they absolutely dominate that market), but if you're the kind to run Ghost with SQLite then may be you should instead give static site generators a look.
SQLite doesn't save you from losing your data when the instance goes away. One requires a backup to avoid that scenario. Sure one can opt for offline manual backups, but then one might as well use a static site generator that doesn't require any of that.
Why would you do manual backups? Just schedule cronjob to periodically upload the database somewhere. You can save it anywhere - other $5 server (not $15), to s3, even on google drive. I don't know if there is threat of database being corrupted midbackup due to writing in it, but if you don't want to risk it, just use sqlite online backup api.
It's basically the missing glue for the manual operations you would normally do on your own computer if you went the Jekyll/Hugo static site generator way. But you don't need to maintain a development environment on your machine.
After the initial setup, a non-developper can use forestry as easily as Wordpress.