Change url structure for specific section

hi,
currently my content looks like
MyProject/content/blog
MyProject/content/recommendation
etc…
so each sections separated by folder

my permalink right now
url.com/blog/post1
url.com/blog/post2
url.com/recommendation/post1
url.com/recommendation/post2
etc…

My question, what if i want the /blog section’s url looks like this
url.com/post1
url.com/post2

but othe section still under url.com/recommendation/post1

thanks

i got it

permalinks:
blog : /:title/

I’ve done essentially exactly the same by setting

[permalinks]
  blog = "/:title"
  • my site deploys perfectly from Netlify but if I actually try to run a hugo build via CLI, I get the following error:

Error: Error building site: failed to render pages: open C:\Users\Lea Pooter\Desktop\Hugo Site Projects\cubemc-blog-rebuild\public\change-is-afoot-in-the-on-hold-and-in-store-industry…\index.html: The system cannot find the path specified.

However, if I take out my [permalinks] config, it builds perfectly. What am I missing?

I found the fix for me. Since I have a slug parameter on pages in these sections, I changed my config to

[permalinks]
  blog = "/:slug"

and now it works!