Closed kmelve closed 1 year ago
https://github.com/Halo-Lab/sanity-lighthouse-plugin/blob/46d67601997c20171f9054e0ad5b945b4cdabdbb/plugins/sanity-lighthouse/src/LighthousePlugin.tsx#L10
Hi! Thanks for making this plugin – seems super cool!
To avoid conflicts with document _type and _id in datasets where this plugin is installed, it can be useful to use a namespacing convention (we should probably document this). For example:
_type
_id
const doc = { _id: 'lighthouse.performance', _type: 'lighthouse.settings', name: 'Sanity Performance Data', data: [], }
This is a convention that we have followed for schema for plugins we made in-house. For example, the Mux input plugin.
Another reason to namespace the _id here is to not expose this document on the public API on datasets set to public visibility.
https://github.com/Halo-Lab/sanity-lighthouse-plugin/blob/46d67601997c20171f9054e0ad5b945b4cdabdbb/plugins/sanity-lighthouse/src/LighthousePlugin.tsx#L10
Hi! Thanks for making this plugin – seems super cool!
To avoid conflicts with document
_type
and_id
in datasets where this plugin is installed, it can be useful to use a namespacing convention (we should probably document this). For example:This is a convention that we have followed for schema for plugins we made in-house. For example, the Mux input plugin.