7 ms·
Goodbye Wordpress, Hello Jamstack
- Spivak 5y ago@the author I know the personal server architecture of a bunch of docker containers reverse-proxied behind Nginx is really easy and popular but it's a lot of overhead and kills your throughput if you don't aggressively cache in the frontend. Look at the proxy_cache_* options and you'll be able to handle the traffic with ease.
- ridings 5y agoHonestly - I like ghost and setup was pretty straight forward. The personal blog was as much a sandbox and learning environment as anything else. I'd be tempted to do Jamstack for it in the future and remove the Ngninx overhead all together (even if just to get rid of the ssl certificate side).
- cube00 5y ago> I just trusted Svelte to deliver on my goals, especially picking it up quickly after six months away. Is there any basis to believe Svelte is any more stable then any other JS framework?
- ridings 5y agoThis wasn't so much the technical stability problem; time will be the real test here. With Svelte I was able to very quickly scan the repo and pickup where I left of, even with long gaps between work.
- codegeek 5y agoIs the site built in JAMstack or WP ? It is down due to HN traffic I assume
- pipnonsense 5y ago> "Powered by Ghost."
- ridings 5y agoError on my part. Shared the link and realised I needed to patch ghost. Took the site down for 5 mins while that was happening.
- _fzslm 5y ago> 502: Bad Gateway hello JAMstack indeed :p
- thatwasunusual 5y ago"The modern way to build Websites and Apps that delivers better performance"[0] Looks promising. /s [0] https://jamstack.org/ https://jamstack.org/
- wffurr 5y agoPresumably this is a blog. A static file server might've handled the HN hug of death without a cache. Any other sort of "stack" is going to need caching, varnish, cdn, etc. EDIT: huh, that site claims the JAMstack is exactly a set of static pages... "With Jamstack, the entire front end is prebuilt into highly optimized static pages and assets during a build process. This process of pre-rendering results in sites which can be served directly from a CDN, reducing the cost, complexity and risk, of dynamic servers as critical infrastructure."
- deleted 5y ago[deleted]
- mayli 5y agois JAMstack just another buzzword for static site hosting?
- 1_player 5y agoNo, it's an over complicated way of using client-side technology to do server-side computation so that it loads as fast as a static page. Groundbreaking.
- ridings 5y agoI don't think Jamstack will become the dominant way to build webapps. 95% of this site was static, brouchure-esque content. I wouldn't try and build a live dashboard using real-time metrics or data intensive graphs using Jamstack.
- deleted 5y ago[deleted]
- busterarm 5y agosort of. it's JavaScript, APIs & Markup. The operating assumption is that you're still going to be doing dynamic work on the site but that it will all be client side. You'll end up rendering huge JSON blobs with your public data in your markup for your client side JavaScript to do things with. Text is cheap. The client side does all of the heavy lifting but you'll probably need things like accurate time, which you can get by rendering pages using NGINX SSI module to render server time on pages. Obviously this won't stop some users from manipulating this information maliciously so you have to be careful what you use and where. Naming this thing was always amusing to me though -- I'd been working with clients to switch from WP to essentially JAMstack years before it was ever named anything. Then suddenly I', in the JAMstack business.
- ridings 5y agoThis is the way. Define a problem and then find a solution. Don’t look at Jamstack and then hunt for problems!
- overshard 5y agoOh man, I always find it funny in a slightly schadenfreude sort of way when someone swaps to a new platform, goes to talk about how great that new platform is, and then the platform can't handle basic load. That being said I do use Jamstack quite extensively, it can trivially handle huge loads due to it being mostly just static files that can be served through CDNs. This seems like it has nothing to do with Jamstack but it's still funny.
- onli 5y agohttps://hillcroftlacrosse.com/ https://hillcroftlacrosse.com/ is the Jamstack site. The blog the submission links to is using Ghost.
- ridings 5y agoI should of moved my blog over to Jamstack. I put this link out and then realised there was a magic link exploit in the ghost version I was using. I took it down to make some emergency changes...DOH!
- cblconfederate 5y agowhose marketing department wrote this?
- ridings 5y agoMy own?
- wjohnsto 5y agoIt's important to know that WordPress can be used as a headless CMS. There is active work in that area with plugins like WPGraphQL[0] and frontend frameworks like Faust.js[1]. So you don't _need_ to leave WordPress in order to use some of the tools and gain the scaling benefits of JAMstack. [0] https://www.wpgraphql.com/ https://www.wpgraphql.com/ [1] https://faustjs.org/ https://faustjs.org/
- busterarm 5y agoIt doesn't even have to be this hard -- just be familiar with how the WordPress database lays out its custom post types. I wrote a Jekyll Generator plugin that just makes a SQL query to the WordPress database and generates all of the sites' content a good 5 or 6 years ago. It's fairly trivial work.
- wjohnsto 5y agoYou're right and your approach works well for all the mostly static content. The tools above are useful if you want to enable things like authentication/gated content, e-commerce etc while also having some static content.
- handrous 5y agoWP also has an HTTP-speaking API, but yeah, I've done the "extract posts and pages directly from the DB" thing too. It's maybe half a day if you've never looked at the WP DB schema before, mainly figuring out which tables & fields you need to look at to select only published items. Probably minutes if you're already familiar with it.
- ridings 5y agoI don't disagree. There's lots of options for the content part. I guess the thing I was trying to point out here was that I didn't need a CMS. The content is static, the site is basically a brochure. I was happy just writing static HTML.
- Dunedan 5y agoThere's another approach which works surprisingly well: If you use Nginx and PHP FPM you can utilize Nginx FastCGI cache [1] to cache dynamic contents. That even allows serving a stale version of an asset while fetching an up-to-date version in the background, avoiding the occasional slow requests for expired items. With such a cache enabled Wordpress sites feel like they're static pages, while they still offer all features Wordpress offers. Here is an example for a tutorial on how to configure that for Wordpress: https://easyengine.io/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/ https://easyengine.io/wordpress-nginx/tutorials/single-site/... [1]: https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_cache https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#...
- addicted 5y agoI found DigitalOcean's Apps offering excellent for a bunch of static sites I've built. 3 free sites, followed by $3/month for each additional static site. And it provides the same convenience of pushing to Github main (or branch of your choice) and having it automatically built and deployed.
- deleted 5y ago[deleted]
- ljoshua 5y agoI've also really liked Netlify's free offerings as well. Same idea as DO's Apps, and it will do builds on pushes to repos, and amazingly it's free too! I have a slew of low-traffic sites, all with custom domains and on-demand builds (mostly Gatsby or custom CRA apps), hosted over at Netlify for $0.
- egberts1 5y agoAs a long-time Pelican (CSS, no Javascript, serverless) static site generator, I am intrigued to know if this Javascript-free approach can be continued with this Astro and maybe Sevlte. It has to be JS-free because I am a vulnerability researcher on JS/WASM-based “file-less” malware.
- VMtest 5y agoI would appreciate if you can share your knowledge on these vulnerabilities
- egberts1 5y agoOnly advices (at this critical juncture) are to keep your website’s CSP very tight, your APIs authenticated. and protected by MFA especially to supplant PII with website-specific index/sequence numbers. Also to mandate HTML5 nonce element usages on all things referenced.
- deleted 5y ago[deleted]
- ridings 5y agoThere is a certain irony on this. My blog site uses ghost not Jamstack. I was using an old version and it had a pretty bad exploit bug related to magic links. I took the site down to patch and then put it back online...If I'd only used SSG for it too.
- daitangio 5y agoI like static site generators, but on my Wordpress Blog I can 1. Got comments and pingback with Antispam 2. Install a nice (Elastic) Search plugin with a decent search engine (name your preferred option). 3. HotSwap on the fly themes 4. Improve performance via cache plugins (there are a lot of them). I do not run JetPack to avoid even Wordpress.com lockin. Also with PHP 8.x and code cache enabled the overall WordPress speed is very high. So how can I get all this feature on static site generators without lockin for comments/search/moderation (just asking)?
- ridings 5y agoYou probably can't and I guess that's ok. I didn't need those features for the project.
- jawngee 5y agoAlgolia for search. Disqus for comments. Are pingbacks really a thing still? Do you really hotswap themes that frequently? You get performance out of the box with SSG that would be a lot of effort to replicate with Wordpress.
- oceanplexian 5y agoIf you're going through the trouble of self-hosting something, why would you then outsource commenting to a company that sells your visitors data? Half the point of running your own platform is to get away from the nexus of dark patterns that have taken over the modern web, otherwise you might as well ditch Wordpress and run your blog on Facebook.
- lancesells 5y agoAny site that uses Disqus is a no-go for me. From their privacy policy: > Disqus uses, and also engages third party ad partners and affiliates who use cookie IDs, device IDs (including mobile), hashed email addresses, IP address, ISP and browser information, demographic or interest data, content viewed and actions taken on the Service or Partner Sites, including information about the websites you’ve viewed and advertisements you’ve interacted within order to provide you with more relevant advertising targeted to your preferences and interests derived from your interaction with the Service, Partner Sites or other third party websites. > We may sell or share your personal data with the parties set out below for the purposes set out in the table in paragraph 5 above.
- johnchristopher 5y agoJeez, the vitriol here. People are jumping to conclusions and bashing jamstack/static without checking the source (it's not a static blog, it's ghost:node+sqlite/mysql) or reading the article (it's not about the blog, it's about https://hillcroftlacrosse.com https://hillcroftlacrosse.com).
- corobo 5y agoPeople were jumping to make jokes about the site being down We could not see the article, source, or that link.. the site was down
- pipnonsense 5y ago> "We could not see the article, source, or that link." That's exactly the point of saying people are "jumping to conclusions".
- corobo 5y agoYes jumping to conclusions to disprove OP is a popular joke format that the internet seems to dig You and the top level are doing the same but to the commenters- it's just one step further down and I feel the jokey aspect has been lost in favour of the internet's favourite response type: mild outrage over nothing Ooh we could call it a MOON response
- pipnonsense 5y agoSorry, I could not understand most of what you meant, but regarding that I am "jumping to conclusions" too I disagree. Comments making fun of a site praising jamstack being down are jumping to two conclusions: the site is itself is using jamstack and the praise of jamstack is for use in blogs. That's what the commenter above pointed out. When I point out that these commenters are jumping to conclusions I am not jumping to conclusions. It is pretty clear that they are associating the use of jamstack and the site being down.
- kayodelycaon 5y agoI love how so many these "just use static html files" posts includes abandoning WYSIWYG interfaces. It's like switching from MS Word to writing LaTeX in Vim. If you don't need the features Wordpress exists for, static html is great. If you do... Wordpress actually works fairly well if you use a caching plugin.
- omnicognate 5y ago> It's like switching from MS Word to writing LaTeX in Vim. And breathing a sigh of relief.
- kayodelycaon 5y agoIf you don't need any of the features MS Word provides and you are proficient in using LaTeX and vim... yes. That's kind of my point. If you can avoid using a heavyweight tool whose features you don't need... don't use it. I highly recommend finding any alternative that would suit your needs. You will be a lot happier. The problem is the constant unspoken assumption that heavyweight tools shouldn't be used at all.
- omnicognate 5y agoIf it's unspoken why assume that assumption is being made? I don't see anything to that effect in the article, and while I can't speak for others I certainly don't have any objection to other people using whatever tools they like. I'm just glad there are alternatives I prefer.
- ridings 5y agoI use VSCode locally. I can make some really small untested edits in github for typos and stuff. Did think about putting a WYSIWYG editor in there but decided I didn't need one.
- cube00 5y agoThe problem could be more that a non-technical person in the sporting club you've built the website for may not be able add new or updated content themselves without that WYSIWYG editor. If you are a member at this club it's fine, but if you're just a local trying to help the club you wouldn't want to be involved in each content update all the time.
- rrdharan 5y agoAt the risk of inciting an OT debate, might it make more sense to post the https:// https:// link (https://thomasridings.com/goodbye-wordpress-hello-jamstack/ https://thomasridings.com/goodbye-wordpress-hello-jamstack/), which does also work? And relatedly for the author since they are commenting, perhaps you should setup an auto-redirect?
- endisneigh 5y agoWordpress definitely has its issues. In this case I think it would've made more sense to just statically compile your wordpress site into HTML and serve that through traditional means (e.g. Azure Blob, Amazon S3, etc), than to go through all the trouble of converting. I'd agree on a new project, jamstack makes sense here.
- ridings 5y agoSo there was a part of the story I haven't told. The wordpress site was painfully slow to load and while I like the look of the theme it was costly from performance perspective. I did try to render the wordpress site out to html but I just didn't find it plain sailing and after a couple of hours research/testing look for a new direction.
- Lammy 5y ago> The backend API calls are all serverless and instantiated on request. I think the "Jamstack" is the single worst trend to ever happen to static site generators as both an author and a reader. The whole appeal of static sites to me is that all the files can live in one place. As a site author this minimizes the number of failure points and things I need to pay for, and as a reader it minimizes my trackable footprint online since connections only need to go to one place. The "Jamstack" throws all of that out and encourages people to glue together as many third-party APIs as possible that they get to keep paying for forever and that cast the surveillance net ever-wider around readers. Of course nothing stops people from Missing The Point and throwing Google Analytics on a totally-static site, but "Jamstack" normalizes that behavior. This is the opposite of progress.
- endisneigh 5y ago> The "Jamstack" throws all of that out and encourages people to glue together as many third-party APIs as possible that they get to keep paying for forever and that cast the surveillance net ever-wider around readers. Of course nothing stops people from Missing The Point and throwing Google Analytics on a totally-static site, but "Jamstack" normalizes that behavior. This is the opposite of progress. To be fair jamstack does not imply 3rd party APIs. A valid jamstack could all be on your own premises, just that every API is deployed independently.
- Lammy 5y agoThat is a fair point. It still cuts you off from other forms of static distribution like IPFS/USB though.
- ridings 5y agoYe I think this could get messy at a point. This project ended up with 2 or 3 API endpoints which I pushed up as serverless to give me some centralisation. Not sure how happy I'd be if I needed to stitch 50+ API services together but not every project has the same requirements and we shouldn't assume the same solution.
- ryantgtg 5y ago
- FugeDaws 5y agoGoodbye Wordpress, Hello Jamst... oh ok Hello Wordpress again
- kodah 5y agoI think I'm a little confused as to what differentiates "JAMStack" from modern decoupled architectures. My website starts up a Go web server and then serves the output of Nuxt. The backend was primarily generated using an OpenAPI generator and uses decentralized auth (JWT/JWE). The backend seems to align to what https://jamstack.org https://jamstack.org calls a "headless CMS" other than the fact that the editor is built into the frontend in the same decoupled fashion. One thing I'm not too sure on is, can a frontend served from a CDN do SSR? It became pretty apparent over the course of developing my blog that hybrid CSR and SSR was optimal.
- ridings 5y agoThere is something funny about this but HN killed my blog. Added the Markdown content here: https://github.com/Ridingst/hillcroft-site https://github.com/Ridingst/hillcroft-site