Self-Host Blog Images in Two Lines of Bash

from blog taylor.town, | ↗ original
My blog is a folder of markdown files. Everybody hates broken links, so here's how I download files to put in /dist: # Download all images referenced by URL. wget $(grep -RIhEo 'https?://[^ )]+' . | grep -e png -e jpg -e jpeg) # Replace all markdown links with relative file names at root. # e.g. [test](/123.png)