Skip to content

Instantly share code, notes, and snippets.

@wildcard
Last active February 10, 2022 20:25
Show Gist options
  • Save wildcard/14d1f6cc529546c3fd8b18a4e60957c1 to your computer and use it in GitHub Desktop.
Save wildcard/14d1f6cc529546c3fd8b18a4e60957c1 to your computer and use it in GitHub Desktop.
Generate yml directives from md files using find
#!/usr/bin/env bash
find . -name '*.md' | sort | xargs -IFILE echo "{ \"file\": \"FILE\", \"title\": \" $( basename 'FILE' ) \" }" | jq -s '.' | yq e -P
@wildcard
Copy link
Author

I was using this one to create relative file paths + title for md file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment