5 ms·
This may be a naive question, but how many websites are actually static these days?
by tome 8y ago
This may be a naive question, but how many websites are actually static these days?
- pixelrevision 8y agoNot a ton. But the idea here is you use javascript to call an API for your dynamic content. This way your javascript/css/images are all setup on a CDN that you don't have to manage.
- manigandham 8y agoBut where does the API come from? Dynamic content needs don't go away with static sites and usually it's yet another service to worry about.
- brbcoding 8y agoIn our case, we moved a blog from WP to a static Gatsby.js site. It's hosted on Netlify and all content is driven by Contentful where updates trigger a webhook on Netlify to rebuild the blog (new posts are pulled during this build process).
- manigandham 8y agoSo now you're using 2 different services to host a site, instead of just using hosted Wordpress (or squarespace, wix, etc). Does Contentful provide the same content editing experience? What are the advantages here?
- fvdessen 8y agoThe advantage is that the resulting website being just static pages will be much faster and secure that your hosted wordpress. And compared to wix etc, you have a lot more control on the appearance and structure of your website, because you can use wathever static website builder you choose
- manigandham 8y agoHow is it more secure when you're still accessing an API? Wordpress itself might not be the best product but other fully-hosted services are all the same, whether they render the site or just give you an API. A CDN is equally fast when the content is cached, and if you're building the entire site as static pages then it's not really a dynamic site in the first place and can also be done with HTML or markdown in the same repo. The fine control seems the be the only real advantage, at the cost of more moving pieces.
- theNextEpisode 8y agoGood luck getting content editors to commit code to a repo or in markdowns. The contentful + netlify setup is really elegant.
- manigandham 8y agoIf you're using Contentful then how is that different or better than wordpress or any hosted system that is made for writing posts? The only 2 advantages of splitting this into separate systems is extra customization (even though hosted solutions are already very flexible) and compiling the entire site into static files. The 2nd seems to be more of a thing for devs to enjoy rather than something that makes a real difference to users, especially when you're already using a CDN.
- brbcoding 8y ago> How is it more secure when you're still accessing an API? It only accesses the API with a read-only token during the build process. > it's not really a dynamic site in the first place and can also be done with HTML or markdown in the same repo This is definitely true and was an option we considered, however colocating hundreds+ posts with code made the repo unnecessarily heavy and slowed our build time drastically. Our content creators also didn't want to use git to edit their content (they would have to learn git / or use the web UI which is a suboptimal editing experience), nor did I want content creators in our repos. > The fine control seems the be the only real advantage, at the cost of more moving pieces. Lots of other advantages that I won't outline here, but our data is completely decoupled from our frontend now, so we can do cool stuff like crossposting to different properties via webhook, data cleanup via API (I ran all the blog posts from WP through some remark tools so we have a more standard look and feel), etc... Might not be the right setup for you, but it works really well for us!
- ubercore 8y agoWe host landing and marketing pages and such on netlify, linking off to the app on a subdomain. It's really convenient.
- jchrisa 8y agoThe model of deploying a single page app that calls serverless endpoints and cloud databases, has architectural reasons to be preferred. Multi-cloud is a great way to be robust to cloud failures, and have better negotiating leverage with your utility vendor. I wrote a blog post about using Netlify with FaunaDB to build multi-cloud serverless applications here: https://fauna.com/blog/survive-cloud-vendor-crashes-with-netlify-and-faunadb https://fauna.com/blog/survive-cloud-vendor-crashes-with-net...
- asprouse 8y agoThere is a static renaissance happening as people realize it doesn't make sense to serve content that rarely changes from a database. Think of the millions of Wordpress blogs that could benefit from the speed, reliability and security of a static frontend. Here is more in-depth argument for static: https://www.takeshape.io/articles/why-the-best-websites-are-static/ https://www.takeshape.io/articles/why-the-best-websites-are-... Also check out https://jamstack.org/ https://jamstack.org/ for more info on tools and techniques for going static.
- freebs 8y agoI'm sure there will be a lot soon. You can trigger builds anytime content is updated via Netlify CMS/Contentful etc.
- wmf 8y agoI think they have a vision of SPAs powered by serverless workers and static assets but they've mostly delivered the static part so far.