Need help making a custom css works in netlify cms

Hello!!
as the title stated, i need help using css in netlify cms, i am using hugo with netlify cms
in my index.html i have this code
CMS.registerPreviewStyle("/cms.css");

and i added the cms.css file in my static folder but when i make changes in this file it doesn’t work, can someone please help me

Have you checked out the custom previews docs? https://www.netlifycms.org/docs/customization/

yes tom i did but i still couldn’t make it work

Just registering the CSS alone isn’t enough. You’ll have to recreate the HTML in JS as well. You can check out a couple of examples here: https://github.com/netlify-templates/one-click-hugo-cms/blob/master/src/js/cms-preview-templates/

Those are registered here: https://github.com/netlify-templates/one-click-hugo-cms/blob/master/src/js/cms.js

1 Like

thank you i will try that