Skip to content

Instantly share code, notes, and snippets.

@critesjosh
Created August 26, 2021 00:16
Show Gist options
  • Save critesjosh/5d123a3c1255844660912067fc077a75 to your computer and use it in GitHub Desktop.
Save critesjosh/5d123a3c1255844660912067fc077a75 to your computer and use it in GitHub Desktop.
a script to modify typedoc output for docusaurus for the celo docs
#!/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