Am using netlify-cms on my development machine and would like to disable it in deployment on netlify. I added a following redirect rule in netlify.toml to hide hugo’s static/admin folder. However the redirect doesn’t work.
[[redirects]]
from = "/admin"
to = "/404.html"
status = 404
I’m no Hugo expert but I believe you can do something like ignorefiles = [ "admin/.*" ] or ignorefiles = [ "admin/.index.html" ] as long as you put it before the [permalinks] config.