The closest you can get to make this possible, is to have a CI/CD pipeline that produces the contents and modifies a placeholder that will be your git commit ID. Hope that makes sense.
I once created a pipeline that produces a PDF that embeds the associated git commit ID in the generated artifacts.