Obsidian has an in-built feature for this: YAML front matter. Sounds like a good idea for a Joplin plugin.