the first idea that came to my mind is to use obsidian.md (or another markdown editor) with the git plugin. Markdown supports frontmatter, that allows you to add metadata to docs. It also supports cross-links between documents.
You could even go full zettlekasten (generate IDs that include timestamps), if you want to version documents more explicitly.