Assuming your static site generator supports third party libraries, you should be able to use any of these implementations that share your static site generator’s language:
https://github.com/commonmark/commonmark-spec/wiki/List-of-CommonMark-Implementations