I added the necessary mermaid.min.js file directly under the _static folder, since it was not being fetched during the building of docs html. Let me know if there is a better way to handle this.
Also there are some small fixes to get rid of the erros while running make html