2021-09-28
$ yq eval --front-matter=extract '.' test.md
Running the above command against the markdown for test.html:
---
title: test
subtitle: markdown test page for this blog
date: 2021-09-28
keywords: [test, markdown]
extract just the keywords:
$ yq eval --front-matter=extract '.keywords[]' test.md
test
markdown
Turning an OPML file (eg from Overcast) into a Markdown list:
xq -r '.opml.body.outline.outline[] | ("* [" + ."@title" + "](" + ."@htmlUrl" + ")")' overcast.opml | sort -u