Not really sure about the title of this question ;-)

Alright, I've added breadcrumbs to a website. These run three levels deep: Homepage - Portfolio - Portfolio-item.

I've added some Schema.org stuff to it, so my partial looks like this:

<ul class="breadcrumbs" role="navigation" itemscope itemtype="https://schema.org/BreadcrumbList">
  {{ nav:breadcrumbs }}
    <li{{ if is_current }} class="current"{{ /if }} itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
      <a href="{{ url }}" itemtype="https://schema.org/Thing" itemprop="item">
        <span itemprop="name">{{ title }}</span>
      </a>

      <meta itemprop="position" content="1" />

    </li>
  {{ /nav:breadcrumbs }}
</ul>

Now, my question is this: apparently Google Search Console really wants that meta itemprop="position" there, but without coding each breadcrumb-path really really verbose, I don't know how to auto-generate the correct position number.

Does anyone have a solution for this? I'm not averse to dive deep into the codebase, but I'm gonna need some help there :-D

Thanks!