Skip to content

Instantly share code, notes, and snippets.

@gavincampbell
Last active June 25, 2020 11:25
Show Gist options
  • Save gavincampbell/72a485049ab2b0dba3ea34655607b5c3 to your computer and use it in GitHub Desktop.
Save gavincampbell/72a485049ab2b0dba3ea34655607b5c3 to your computer and use it in GitHub Desktop.
Update a markdown file to use hugo figure shortcode instead of markdown img links
sed -i 's/!\[\(.*\)\] \?(https:\/\/.*\/\(.*\))/{{< figure src="\2" caption="\1" >}}/g' index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment