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? Creating Custom Previews | Netlify CMS | Open-Source Content Management System

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: one-click-hugo-cms/src/js/cms-preview-templates at master · netlify-templates/one-click-hugo-cms · GitHub

Those are registered here: one-click-hugo-cms/cms.js at master · netlify-templates/one-click-hugo-cms · GitHub

1 Like

thank you i will try that