Use an expression to select an array value in PHP. It's handy for quick output logic. Update: it's a bit too clever, perhaps, versus using the tenary operator.
$classes .= [ ' sort-default', ' sort-custom' ][ has_custom_sort( $post ) ];
Use an expression to select an array value in PHP. It's handy for quick output logic. Update: it's a bit too clever, perhaps, versus using the tenary operator.
$classes .= [ ' sort-default', ' sort-custom' ][ has_custom_sort( $post ) ];
So for nginx it is not straightforward to setup PHP-FPM so that PATH_INFO is correctly populated. Lamb uses the following /index.php/some/other type routing, where /some/other should be the PATH_INFO. Instead I want to make setup for a variety of web-servers straightforward, so I've switched to the more robust REQUEST_URI. This simplifies nginx configuration and Caddy and the PHP built-in web-server are compatible.
I was thinking of the concept of running a blog like #Lamb in CI, with the artefact hosted as HTML somewhere. Of course this is the essence of what a static site generator (SSG) is. The downside of a SSG is that the publish experience is not up to the same standard as a server-side blog, as the data structure not enforced in the editor and things like search don't exist or are limited.
It seems sometimes I'm researching and want the previous tab to become active after closing a deep dive, and other times I'm reviewing the tabs and want the tab to the right of the active one to become active. Is there any way to codify this I keep changing my browser's settings. #technology
Cut a sharp end to a plastic straw. It makes for a good phone charging port cleaner! Actually, it worked better than a tooth pick for me. #technology
We need more instant publishing on the web. All the UI holds back our ideas. #technology #lamb #projects
Found an interesting article with a positive take on useful features that modern blogs should have. The Hacker News comment thread shows that whether a feature is considered useful is very subjective.
To navigate an XBOX series games console using an LG Magic Remote, first disable the Automatic Configuration option in the Connection settings under HDMI Configuration in the TV's settings. Reconnect the XBOX's HDMI cable going into the TV. Then on the input switcher, edit the Xbox setting, mark it as a Blu-ray player manufactured by Microsoft, and follow the wizard. #technology
Looking at my browser tabs, I can't believe that we collectively have still not standardized on page title vs site title formats in 2024. I've seen SITE - PAGE, PAGE / SITE, PAGE | SITE, SITE: PAGE, PAGE etc. I'd prefer it if we had a sitetitle tag in head and let the browser figure it out. #technology #html
Content vs crap. #technology
Why do web-browsers not have a dedicated "Back to top" button? #technology