awoojs / core

:cd: officially supported plugins for awoo
4 stars 2 forks source link

metadata vfile location #7

Open Lynncubus opened 6 years ago

Lynncubus commented 6 years ago

Hey there, just a quick little question.

As the vfile documentation suggests there is a standard location for storing custom data in a vfile under .data (https://github.com/vfile/vfile#vfiledata). Was .metadata chosen on purpose in awoo-matter and awoo-metadata? It'd make sense to store such data in its standard location.

zipang commented 6 years ago

Hi everyone ! I'll give my 👍 to this request, because vfile has so clearly documented this location, and it makes more sense to store front-matter parsed fields inside data because my front matter is clearly data belonging to the file and not external data.. I would really reserve the namespace metadata to store external relations like : next and previous (for a collection plugin similar to metalsmith-collection that i intend to provide sometime soon). I would argue that promoting and documenting the separate use of these namespaces for clearly different purposes will help establish good practices for plugin authors and should mitigate the key collision issue (something that metalsmith failed at).