Created
August 26, 2021 00:16
-
-
Save critesjosh/5d123a3c1255844660912067fc077a75 to your computer and use it in GitHub Desktop.
a script to modify typedoc output for docusaurus for the celo docs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
string="sdk-docs/contractkit/" | |
for f in docs/**/_*; do | |
newfile="$(echo ${f} | sed -e 's/\_//')"; | |
line=$(head -n 1 $f); | |
title="$(echo ${line} | sed -e 's/.*://')"; | |
echo -e "---\ntitle: ${title}\nslug: $string/${f}\n---\n\n$(cat $f)" > $f | |
mv $f $newfile; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment