Skip to content

Instantly share code, notes, and snippets.

@gagan-bansal
Last active September 27, 2022 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gagan-bansal/39152afcafdf9a185f87536b4163feab to your computer and use it in GitHub Desktop.
Save gagan-bansal/39152afcafdf9a185f87536b4163feab to your computer and use it in GitHub Desktop.
Convert all your markdown files to HTML files. Required installation of marked module (https://www.npmjs.com/package/marked).
marked --gfm README.md | sed 's/\.md">/.html">/g' > README.html
for i in `find ./docs/ -name '*md' `
do
out=`echo $i |sed "s/\.md/.html"/g`
echo $i '->' $out
marked --gfm $i | sed 's/\.md">/.html">/g' > $out
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment