Remove front matter of submission to google docs


I am working on a project that uses markdown with front matter. The front matter needs to stay in the markdown files so that the website renders properly. I want to be able to remove the frontmatter when publishing to google docs because it isn’t necessary to have it then. I see there’s templates that might be able to do this but I can not figure out how. Is this possible?

Thank you.


I am using this template with the added styles to hide the frontmatter. It works perfectly when I export the file as HTML but when publishing to google docs it shows the frontmatter and doesn’t use the correct styles. Is there any way to fix this?