The most lightweight solution is probably to install the Dashboard tool to you Studio. Briefly, what you do is
- Install the Dashboard tool to you Studio:
sanity install @sanity/dashboard
- Create a
src/dashboardConfig.js
file and make it contain the following:
export default {
widgets: [
{
name: 'project-info'
},
{
name: 'project-users'
}
]
}
- Let your Studio know that you've implemented your own dashboard config by appending this to your
sanity.json
file:
{
"implements": "part:@sanity/dashboard/config",
"path": "./dashboardConfig.js"
}
Congrats, you now have a Dashboard with two Widgets in your Studio! Confirm this by running it locally and point your browser to http://localhost:3333/dashboard.
Next, you'll want to create your own widget. For a flying start, grab a skinny example which already works
sanity init plugin https://github.com/sanity-io/plugin-template-dashboard-widget-cats/archive/master.zip
The above cats
Widget will be installed to the /plugins
folder of your Studio. Go ahead and edit it (it's basically just a React component) to get the results you want. Or use it as a guideline for how to create your own widget.
Hope this helps you out!