Skip to content

Instantly share code, notes, and snippets.

@vadimkantorov
Created February 10, 2025 14:32
Show Gist options
  • Save vadimkantorov/dac3dc11f6beb61cce658ab84b7c8372 to your computer and use it in GitHub Desktop.
Save vadimkantorov/dac3dc11f6beb61cce658ab84b7c8372 to your computer and use it in GitHub Desktop.
Sed script to prepend a Jekyll/Liquid front matter to a file
# prependfrontmatter ./index.html
alias prependfrontmatter="sed -i '1i---\n---'"
# https://unix.stackexchange.com/questions/99350/how-to-insert-text-before-the-first-line-of-a-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment