update the generate util to support the markdown