BreadcrumbList JSON-LD Schema.org structured data

Well, I mean “dynamic” = one code valids for all url. Yes, not really good word in this case (remove from title…).
All (two or three) BreadcrumbList solutions in discourse.gohugo.io don’t meet requirements.

For example, this one just cut .Page url and creates item - name from that url. It doesn’t reflect real breadcrumb navigation on page.
So you cannot have different item url and item name (as is usuall).
Also if you use short url, this method is useless (i.e. if you use url: yourdomain.com/product-name instead of long url yourdomain.com/category/subcategory/product-name ).
So I just hoped to get here some working general method.