You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defining a document type brings the entirety of content for that document into the data object that we import into pages. I'm potentially importing much more information than I need to work with. It also forces me to write filtering logic in the template. And while this is a fairly typical pattern with Next.js, it's not a pleasant developer experience.
Proposal is to allow for named scopes when defining a document type. Something like this:
The key decision here is finding a balance between being too magical (appending "Docs" to the scope name) and having to validate that scopes across all types be unique.
Defining a document type brings the entirety of content for that document into the data object that we import into pages. I'm potentially importing much more information than I need to work with. It also forces me to write filtering logic in the template. And while this is a fairly typical pattern with Next.js, it's not a pleasant developer experience.
Proposal is to allow for named scopes when defining a document type. Something like this:
I don't have a strong opinion on how this would then be used, but maybe something like this:
The key decision here is finding a balance between being too magical (appending "Docs" to the scope name) and having to validate that scopes across all types be unique.
(Inpsired from a conversation with @smnh.)
The text was updated successfully, but these errors were encountered: