DeCap Widgets is a collection of widgets for the DeCap.
Decap & custom widgets are added to a page by adding the following script tag to your page:
<script src="https://components.dynamicplatform.com/dpl-decap/0.0.1/decap-cms.js"></script>
<script src="https://components.dynamicplatform.com/dpl-decap/0.0.1/main.js"></script>
This is typically done in the /admin route, but can be added to an obfuscated route.
Add a directory to the /src directory with the name of your widget.
Create the following files:
Control.js - the default export is a React component that is the editor for the widgetPreview.js - the default export is a React component that is the preview for the widget index.js - this is just a barrel for easy export of the componentsEdit ./src/index.js add import for the new index.js
v0.0.1 [2024-03-08] dpl-decap v 0.0.1 (a9fd6ddac9333bd0954e9760aca9b7509cc04349)
v0.0.1 [2024-03-08] decap release (767859781c4dccbbd18a289524051a2d536bcaf3)