I have markdown files that contain YAML frontmatter metadata, like this:
---
title: Something Somethingelse
author: Somebody Sometheson
---
But the YAML is of varying widths. Can I use a Posix command like sed
to remove that frontmatter when it's at the beginning of a file? Something that just removes everything between ---
and ---
, inclusive, but also ignores the rest of the file, in case there are ---
s elsewhere.