I'm making a website based on Gatsby and I'm currently trying to add a custom component in the NetlifyCMS. It's the fontawesome widget, but I tried to add it thank to the netlifycms documentation, but it still doesn't work.
I did that :
(in static/admin/cms.js)
import * as FontawesomeWidget from "netlify-cms-widget-fontawesome";
CMS.registerWidget(
"fontawesome",
FontawesomeWidget.Solid,
FontawesomeWidget.Preview
);
(in static/admin/index.html)
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
<script src="./cms.js"></script>
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
</body>
</html>
I should have my component working in the CMS, but I have this error :
No control for widget 'fontawesome'.
Do you have any idea how to fix that ?