Oh! I forgot to say. https://caniphp.com/ has an “API” now. It’s just a static JSON version of the data. There’s no parameters of filters. But it might be useful if you want to build anything on top of the data.
Please cache this if you use it. Thanks.
Am I the first to do this? No.
Do I care? No.
Was this fun to make? Yes!
Any other questions?
So… showable progress on the little static #WordPress mobile headless web app thing.
This little tool:
– Scraped the REST API of my local copy of my blog
– Saved all the JSON responses as static files
– Indexed using Pagefind (https://pagefind.app/)
– Has a thin JS (actually Alpine.js) and HTML layer on top
– 100% static files!
Not QUITE ready for consumption yet. And has MANY caveats. But no reason it shouldn't work with simple blog sites.
Another thing about this is: Gosh coding a clean PHP project with types and data objects and services and PHPStorm/static analysis is a JOY!!
I’ve said this before – I FLY in this environment.
Also: I’ve now added to my list of things-a-web-dev-must-build that I have built:
– Todo list
– Static site generator
– Geolocation app
– Snake game
– Simple social network/chat
– Cards Against Humanity clone
– Wordle clone
– Mobile headless app framework
I think I just need to make a drag-and-drop Kanban board and I’ve qualified! 😂
… I figured if I constrained it I could make this a framework/toolkit.
I’m well on the way with this! I have a nice CLI scraping tool. Grabs and saves all the JSON.
In theory I can just layer my little web app code on top and be done! Yay!
However, I recently found Pagefind – a static site search library: https://pagefind.app/
I wanted to integrate this. BUT it crawls HTML pages.
So I’m wondering if I need to to save and serve HTML instead of JSON.
A while ago I made a little web app that re-presents a very static website in an app-like interface. This is private because it’s technically using copyrighted content (I own the book, FWIW, and the website version of the content is free to view).
I made this by scraping the content using the WordPress REST API and storing/serving the resulting JSON statically.
It’s effectively a simple headless content app! …
In which frameworks and tooling that normally make things so easy, really messed up my “quick prototype” this evening. 😬
I did some looking around…Websites that sell to developers have virtually NO PEOPLE on them!!
– Vectors, illustrations, screenshots
– Very few pop-ups and exit intents (even without ad blockers)
– Lots of dark mode
What does this say about marketing to this audience? 🤔
Well, THIS is interesting. An argument that you should commit ALL your dependencies (including build toolchain) to version control. I get the argument. Is this practical anywhere right now?
Not actually very hard when you just use HTML and CSS to write a simple, informative web page!
I'm not sure the right photo won the Comedy Wildlife Photography Awards (the owl is the best, IMO!). But they're a fun Friday thing:
I’m not a fancy car dude. But the novelty of remote controlling it to turn the heater and demister on is going to take a while to fade. 😃
So I started writing this little web-app version of an old WordPress site that consumed the API.
And now… of course… I'm thinking I might be able to abstract it into a universal generator for statically-served, mobile-friendly web-apps based on WordPress sites.
No, Ross. You don't need to do this!!!! 😂
AI thoughts continued…
– I should say that my wife’s CV is excellent. And that has very little to do with the few tiny things that I helped with while proof reading.
– No AI was involved in writing my wife’s CV (if future employers are reading)…
– … but even if it was, is that a bad thing?
– I really don’t know what to make of these LLMs and chat interfaces, but the questions and conversations around them are FASCINATING!!
– “It’s like a thesaurus, but for whole paragraphs!” 😎
AI thoughts continued…
Doesn’t the AI make stuff up? It doesn’t understand anything!
Sometimes. You can fact check it. Humans are still required. And so what if it doesn’t understanding anything? Do *I* understand your CV?
Maybe. But I’ve seen a bunch of CVs and CV writing advice and I kinda know how to structure a good CV. I’ve seen what you’ve written and edited it into that kind of format. You’ll still read it and make changes to what I’ve done.
That’s no different to asking ChatGPT.
My wife has been writing a new CV these last few days. She has had me review it.
I suggested ChatGPT could help with editing. She says this is “wrong”.
“Why?”, I ask.
Because I don’t want to outsource the work to a machine.
So you outsourced it to me?
But you’re not a machine?
What if I told you I got ChatGPT to help rewrite your personal statement?
(I didn’t – it was just a thought experiment)
Interesting little weekend project:
– There’s an old WordPress site with static content. It’s not mobile friendly.
– The REST API works so I can grab all the post JSON.
– Now I can rebuild all the pages and logic
– But for fun… can I use the JSON files as a static “headless” API and build an app-like front end?
– I chose AlpineJS but it has no routing. It’s the wrong tool.
– But I’ll persevere. It’s just a toy project!!
🤖 I’m using AI. This tech is amazing. Especially when it enhances human productivity rather than replaces it. But gosh I can see how it breaks the web.
I want to post this without comment because it is just perfectly executed and brilliant.
But you need to know what it's about: It's slides and script of a superb talk about the costs and benefits of adopting new technology.
It should be required reading for people working in tech.