Dev Portal server-side lua code

In the Dev Portal Editor under THEMES there is /base/partials/service-catalog/sidebar.html. In this file there is this lua template:

{% if not page.hide_categories then %}
<div class="catalog-sidebar">
  <div class="catalog-categories-component">
    <h5>{{ l("catalog_categories_header_text", "Category") }}</h5>

    {% for tag, count in each(tags) do %}
    <a data-tag="{{ tag:lower() }}" class="tag-link">
      <span class="tag-link--name">{{ tag }}</span>
      <span class="tag-link--count">{{ count }}</span>
    </a>
    {% end %}
  </div>
</div>
{% end %}

We want to change the algorithm used to generate the ‘tags’ map, which are the catalog categories and counts of APIs that have those tags. Currently it uses partial matches to determine the count. We want it to only use exact matches such that ‘Client’ only matches ‘Client’ and not ‘ClientManagement’.

Since this code runs on the server-side it isn’t possible to change it in the Dev Portal. How can we make changes to the server-side code?