Clues in Craft's source code, news, tips, plugins, and more.
Welcome to another issue of Craft Link List. It may be mid-summer (at least from where I sit), but there are still posts, tips, and other links to keep you occupied while you code by the poolside.
There’s a link in the “news” section that takes us to the source code of a work-in-progress branch of Craft. There are many interesting Craft-specific articles, highlights from the Craft CMS StackExchange, new plugins to check out, and general web dev posts.
Thank you to Solspace for sponsoring this issue. If you’ve got a form to create, check out Freeform, the feature-rich plugin for Craft CMS.
Have you written a post about Craft? Submit a link. Do you want to reach over 1000 Craft developers? Sponsor a future issue.
Let’s hit the links.
There have been eight releases of Craft 3 since the previous issue.
The changes in this set of releases are tweaks around the creation and saving of draft entries, a behavior that received a significant update in the initial 3.2 release. Specifically, Craft 3.2.8 comes with a new “Drafts” entry status for viewing unsaved drafts that haven’t become “real” entries yet, as seen in this screenshot.
Craft Commerce 3.0 Alpha 1
Craft Commerce 3.0 Alpha 1 has been made public. As announced on Twitter, Commerce 3 will include back-end order creation.
Pull Request #4540: Add GraphQL API
The Craft team seems to be working on a Turbo Encabulator. Or, just maybe, Andris Sevcenko's pull request has something to do with his upcoming talk at Dot All, Modern Web Development with Craft, Vue, and GraphQL, with Jake Dohm.
Tools, tips, and fundamentals
Adding favicons to Craft CMS website
Learn how to create favicons from images uploaded through the Craft CMS control panel in this post from Craft Snippets, aka Piotr Pogorzelski.
Creating article excerpts with Twig component in Craft CMS ⭐️
Piotr is back with another helpful article discussing how to generate article excerpts using a reusable and robust Twig component.
Starter theme for Craft CMS
This starter theme for Craft CMS can be used as scaffolding for any project. It contains boilerplate Twig templates, basic CSS styles, and gulp config. 🏒🥅
How to grab a link to an Asset in the control panel
There are options hidden behind your gear icon in your Assets listing page.
How to use Imager with ImageMagick to get cool image effects
Vaughn D. Taylor wants to transform your expectation of what you can do with Imager + ImageMagick in your Craft sites. (Transform... get it?... I'm here all issue. Try the veal.)
Fork - a fast and friendly git client for Mac and Windows
Another Git client enters the ring.
Perfecting your technique
Craft CMS as a free invoice tool for freelancers ,⭐️
This post by Sten Van den Bergh explores a workflow to manage and create custom PDF invoices in Craft.
Answered: What are the different scenarios to plan for when using $allowAnonymous in a controller?
In the last issue, this question needed an answer. Ben’s question gets answered by another Ben.
Testing with Codeception ⭐️
CraftQuest has another interesting course for subscribers. As I write this, there are eight episodes posted, and there are more to come.
Craft 3.2 and later supports automated testing with Codeception. In this course, we learn how to set up and use Codeception for automated acceptance and functional testing of our Craft CMS website projects.
Craft Campaign tests ⭐️
Are you looking to see how to perform tests in your plug-ins? Ben Croker has added tests to his Campaign plug-in. The link above is the source code of the unit tests. See Ben's tweet for a screenshot of the unit tests running successfully.
Zen and the Art of Craft CMS Log File Reading
Andrew is back to drop some knowledge. Like a black box recording, log files contain precious forensic information for when you have to diagnose problems. Let’s learn the art of reading them.
Creating a Custom Logger for Craft CMS
Andrew is on a roll about logging. (Get it... rolling... and logs...?? I'm here all issue.)
The built-in Craft CMS logging system is sufficient for most needs, but what if you need custom logging, or want to send your logs to a third-party service? 🏒🥅
Live preview using Vue.js ⭐️
This Stack Exchange post is helpful for those of you working on SPA's and trying to get Craft's support for live previews in SPA working. It's specific to Vue but if you're working with React, Svelte or something else, the same principles will apply.
Pricing out a Craft 2 to Craft 3 upgrade?
This Tweet on estimating the cost to upgrade a Craft 2 site to Craft 3 is a good starting point if you're creating an estimate for an upgrade like this for a client.
Convenience, built right into Freeform
Freeform’s extensive built-in convenience features and flexible templating will have you ready in minutes! No other form plugin even comes close to comparing! Stop wasting valuable development hours wrestling with and tuning the Craft Contact Form or other alternatives.
LJ Color Picker
A simple color picker for Craft CMS based on the jQuery Spectrum plugin.
LJ Range Slider
An easy-to-use, flexible, and responsive range slider for Craft CMS.
Guide lets you create a CMS user manual within Craft CMS, so clients don't need to go far to get the answers they need. The plugin includes a free Lite edition and a paid Pro edition.
The Bulk Edit plugin adds an action to supported element index pages that allows you to edit fields on a large number of elements at once.
LJ Default Text
Adds a Default Value setting to the Plain Text field.
Slug Equals Title
This plugin makes sure that the slug is always the same as the title.
Neo To Matrix Export Plus Plugin
Export nested Neo fields to a combination of Matrix for top-level and Super table fields for nested levels.
Glide for Craft
On-demand image manipulation for Craft 3 using Glide 1.0 from The PHP League.
<img src="myimage.jpg?w=100&h=200" alt="My Image" />
It’s not Craft, but it’s interesting.
Browsers are pretty good at loading pages, it turns out
Thinking about building a SPA?
Browser developers are really good at their jobs, and they’ve spent a lot of time on features like progressive rendering that help your sites feel fast without any effort on your part. It’s not worth it to try and go behind their backs—premature optimizations like client-side navigation are hard to build, don’t work very well, will probably be obsolete in a couple of years, and make life worse for a decent portion of your users.
Support Dark Mode with Tailwind CSS
Targeting a user's dark-mode preference isn't built into Tailwind, but this post shows how easy it is to add that support.
This web app makes customizing your Tailwind config file with custom colors a breeze.
Intrinsically Responsive CSS Grid with minmax() and min()
...it’s not possible to create an “intrinsically responsive grid” — that is, a grid that is responsive based on the size of its container, without the use of media queries. But thanks to some standards that are now available in some browsers and on their way to others, we can fix that!
Wrap the value in an object when using console.log
Another great tip from Twitter.
How to download an entire website with w-get
Andrew on the magic of
wget -mpk example.com.
GraphQL: The Documentary (Official Release) - YouTube
If you want some history on the origins of GraphQL this is the video for you.
We'll go over some lesser-known and other possibly hard to remember methods that are included natively within arrays API.