Skip to content
Snippets Groups Projects
Commit d9023adf authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

new file: scripts/meta-json.sh

parent cf7b63ec
Branches
No related tags found
1 merge request!486new file: content/docs/anselm/compute-nodes.mdx
#!/bin/bash
find content/docs -type d -exec bash -c 'cd "{}" && DIR=$(basename "$PWD"); TITLE=$(echo "$DIR" | sed -E "s/^(.)/\U\1/") && jq -n --arg title "$TITLE" --argjson pages "$(ls *.mdx 2>/dev/null | sed "s/\.mdx$//" | jq -R . | jq -s .)" "{title: \$title, pages: \$pages}" > meta.json' \;
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment