Table of contents for org-mode is empty

Another approach is that you use the ox-hugo Emacs package (shameless plug).

You write posts in natural Org mode as usual, even with each post being just a different subtree instead of a different file. ox-hugo then exports that to Hugo/Blackfriday compatible Markdown with front-matter.

With auto-save hook, each file save will auto-export the current post to Markdown. So when it comes to publishing the blog, you just commit the Markdown files created in the content/ directory and have Netlify/Gitlab CI/etc. take care of the rest.