URL base to categories

i have taxonomy for tags & categories,
is it possible in hugo to write URL with categories write in frontmatter ? ;

For exemple : mysite.com/categories/postorpage.md
if i have categories = “chocolate” in my frontmatter.
my url will be url : mysite.com/chocolate/postorpage.md


The typical way to do this would be to actually structure the content into the folders you wanted the URL to be. So posterpage.md would be located in the chocolate/ directory, and the URL would be what you want.

But if you didn’t want to structure it that way, you can also specify the URL you want content to have in the front matter, or an alias to the same content (on the same doc page).

I don’t know if you can use another front-matter variable in the URL value though, but my guess would be no as I doubt those fields are processed like a template.