I quite like the Deno Fresh framework. It creates
sites with fantastic DXDeveloper
Experience and embraces the resurgent “use the
platform” pattern. What I have appreciated most recently is how
quickly you can optimize a Deno Fresh site. Hosting on Deno deploy, you get
instant builds. As soon as I hit Enter to push local changes to GitHub, I
can refresh the browser and see that the changes I just made are already live on
Deno Deploy. Such a short feedback loop makes optimizing sites a whole lot
faster. You can run PageSpeed Insights or other tools on the live site and
immediately see the impact of the latest changes.
Deno Fresh also gives you, the developer, more control over your sites. Although
you get a lot of convenience from any modern framework, some have a trade-off of
less control. In fact, I noticed Adam Argyle has moved
his personal site to Deno Fresh and
mentioned Fresh not making decisions, which he did not want to make as a reason
for his choice.
Personally, I found implementing the tips which PageSpeed Insights offers much
more straightforward with Fresh. As an example, because you add the link tags
for CSS yourself, splitting off non-critical CSS is simple. You can have
separate CSS files for desktop and mobile (using a media query in the link tag)
or defer loading CSS which the browser needs, but not straight away.
I created a Rust WASM module to help with Markdown processing for this
newsletter. Admittedly, this was mostly to help in my quest to learn Rust. I was
delighted to get positive feedback on the module and a request to add it to
deno.land/x (a collection of third-party modules for
Naturally, I obliged and it is now on deno.land/x. The module is called
Parsedown. Parsedown parses Markdown to
HTML, adding anchor links for titles. It also performs some minor text
formatting (like replacing “'” with “’”). As well as that, it works out
reading time and has a separate function for generating Email HTML from
MJML. All of this makes it much easier to distribute the newsletter on the
site as HTML and also in emails as Email HTML and plaintext.
Give it a try if you are interested and drop some ideas for improvements.
Productivity — Graphite Stacked Git Commits:
I’ve started trying this Git tooling out. It is designed to let you make
changes to your code incrementally, adding them to its stack. This lets your
peers review changes in smaller chunks, rather than having to block out a
chunk of time for the process. Each branch you create is a new stack element.
The stack model lets you push the reviewed changes to the trunk (or main)
branch even while later ones are pending review. It works mostly from the CLI
and integrates closely with git. There is an online dashboard, though, which
shows you your pending reviews.
Resources — Docker Curriculum: if
you’re someone who puts off using Docker until they really have to, you might
find Prakhar Srivastav tutorial useful. It is suitable for Docker novices
and takes you right from setting up Docker on your device. To follow along,
you will need AWS and Docker Hub accounts, but you can just read along or use
other services you might prefer.
Performance — jampack:
this is a newly open sourced tool for optimizing your static sites. You run it
post-build to compress images and bump up your Core Web Vitals scores.
From what I have seen, it doesn’t optimize fonts, but
you can use the subfont tool with static sites.
Both are worth a try if you need to make your site a little faster, especially
if you have not yet optimized your images.