• hawksworx
  • blog
  • speaking
  • about
  • search

Notes - page 135

  • Newest
  • Previous
  • Next
  • Oldest

The archive of what I posted on Twitter, which I now self host due to a lack of trust in Twitter and some other reasons.

I'll soon begin refelcting all my Mastodon posts here too. I'm happier self-hosting or maintaining an archive of my content on URLs that I can own.

There are tools to help you do this too. Such as this one from the makers of Eleventy.

A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @philhawksworth
@DavidDarnes @chriscoyier @cloudinary @Netlify ...or indeed, @eleven_ty could generate the _redirects file. (Relating this back to @chriscoyier's example )
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @DavidDarnes
@DavidDarnes @chriscoyier @cloudinary @Netlify Oooh that's a thought! A build plugin (or just a build script which performed logic based on the CONTEXT environment variable) could generate a couple of lines of _redirect config to do this quite nicely!

https://docs.netlify.com/configure-builds/environment-variables/#build-metadata
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @chriscoyier
@chriscoyier @cloudinary @Netlify Not yet. I personally do similar things to you in using my template logic and an env var to give the right path.

But with if redirects could be per build context in netlify.toml, you could leave the HTML the same and toggle one line in your redirect.

Voting for that feature!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @sunnysinghio
@sunnysinghio @cloudinary Luckily you can give @cloudinary a list of domains which are approved asset sources, so you can safeguard against that.

To test, try specifying a resource from another domain in this:
https://res.cloudinary.com/philhawksworth/image/fetch/q_auto,f_auto,h_200/https://petsof.netlify.app/images/angel.jpg
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @philhawksworth
Hello again old friend.

https://twitter.com/philhawksworth/status/1252321499312259074
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @chriscoyier
@chriscoyier @mraerino @cloudinary @Netlify True. The bit I left out for the sake of brevity, is that I also have a custom 404 rule which defaults to the original image url if Cloudinary can't find it.

Working locally with Netlify dev should make this all hum along nicely.

https://github.com/netlify/petsofnetlify/blob/master/netlify.toml#L18-L22
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @philhawksworth
With this, I can replace "images" with "cloudinaried" in the URL of any image on my site to serve an optimized version directly form @cloudinary's CDN.

I'l be using this a lot!
First stop: https://github.com/netlify/petsofnetlify
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020
A nice trick to optimize your site's images without a build process or any library or framework cruft.

1. Upload & serve from @cloudinary in one step thanks to their Fetched URL API
2. Make it portable and simple with a @netlify CDN proxy

URLs FTW!

📚 https://url.netlify.com/r1g4F-x9D
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020
I cannot recommend working with @a_alfredo highly enough!

👀 https://twitter.com/a_alfredo/status/1328301257547714565
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020
I WON CELEBRITY MASTERCHEF! https://twitter.com/philhawksworth/status/1328296440137965569
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020
I WON THE NBA FINALS https://twitter.com/realDonaldTrump/status/1328200072987893762
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @jlengstorf
@jlengstorf @SalientKnight @cassidoo @levlinds FWIW this is the exact usecase I had in this example which is framework agnostic. 404s are handled by a servlerless function which attempts to render content on demand.

https://css-tricks.com/static-first-pre-generated-jamstack-sites-with-serverless-rendering-as-a-fallback/
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020 replying to this from @brendandawes
@brendandawes Yes. Brilliant telly. Wonderfully produced.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 16th 2020
Mindbogglingly cool! https://twitter.com/mattb/status/1312503931268784130
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 13th 2020 replying to this from @jna_sh
@jna_sh A lanyard factory
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 13th 2020 replying to this from @scottmathson
@scottmathson @Netlify @bamboohr A year already?!

a. That's gone so fast.
b. I can't imagine a time without you.

A solid year. Onwards!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 11th 2020 replying to this from @rafahari
@rafahari @DavidDarnes @Ember_Tech 🤯 #Edutainment
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 11th 2020 replying to this from @rafahari
@rafahari @DavidDarnes @Ember_Tech The excitement as you chose to go in again looked unbeatable.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 11th 2020 replying to this from @rafahari
@rafahari @DavidDarnes @Ember_Tech That second gulp tho!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 11th 2020 replying to this from @rafahari
@rafahari @DavidDarnes @Ember_Tech @layoutfm If @Ember_Tech sponsored @layoutfm I’d find it impossible to not buy one.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 10th 2020
This https://twitter.com/shayonj/status/1326171078557884416
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 10th 2020 replying to this from @lesliecdubs
@lesliecdubs @lettershoppe Oooooh. Happily running headlong down this rabbit hole!
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 10th 2020 replying to this from @5t3ph
@5t3ph @eleven_ty Ooh. A timely reminder. Signing up and planning popcorn.
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 10th 2020
My rather excellent colleague, @lesliecdubs has her name written in this gorgeously flamboyant cursive SVG on her site and it makes me audibly "ooh" and "aaaah" every time I see it.

https://leslie.dev/
  • Permalink
  • |
  • Twitter
A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth • November 9th 2020
RT @nimbella: On Nov 23rd, 9am PST: #3HoursOfJamstack will take place. If you're new to the Jamstack or looking to improve your skills, the…
  • Permalink
  • |
  • Twitter
  • Newest
  • Previous
  • Next
  • Oldest

The source code of this site is available on GitHub and is hosted and updated by Netlify automatically after each code commit

Other than where specified, the content on this site is published under a Creative Commons Attribution 3.0 licence.

Subscribe to a feed of blog posts on this site.