Jekyll liquid syntax for loading _data subfolders for Staticman comments?

I’m trying to set up staticman comments and have gotten all the code implemented to save comments correctly, but the comments are not loading.

My site has multiple types of pages so I have recipe comments save in _data/comments/recipes/recipe-name/entry12233445430320.yml

The problem is in this code:

  {% assign urlslug = page.url | remove:'.html' | remove_first:'/' | split: '/' %}
  {% assign urlfolder = urlslug[0] %}
  {% assign urlfilename = urlslug[1] %}
  <h2>{{urlfolder}}</h2><h2>{{urlfilename}}</h2>
  <h2>{{post_slug}}</h2>
  {% if site.data.comments.recipes[urlfilename] %}
  <!-- Existing comments -->
  <div class="comments__existing">
    <h2>Comments</h2>
    {% assign comments = site.data.recipes[urlfilename] | where_exp: "item", "item.replying_to_uid == ''" %}
    {% assign comments_by_date = comments | sort: 'date' | reverse %}
    <!-- List main comments in reverse date order, newest first. List replies in date order, oldest first. -->
    {% for comment in comments_by_date %}
    {%- assign email           = comment.email %}
    {%- assign name            = comment.name %}
    {%- assign url             = comment.url %}
    {%- assign date            = comment.date %}
    {%- assign message         = comment.message %}
    {%- assign uid             = comment._id %}
    {% include comment.html is_reply=false uid=uid replying_to=0 email=email name=name url=url date=date message=message uid=uid %}
    {% endfor %}
  </div>
  {% endif %}

The original code used {% if site.data.comments[post_slug] %} with {% capture post_slug %}{{ page.title | slugify: "latin" }}{% endcapture %}

page.slug doesn’t exist on my site, and it doesn’t work when I put a variable there to pass it “recipes/recipe-name”

As you can see above, I’ve tried using a liquid split and formatting it as site.data.comments.recipes[recipe-name] but that didn’t work either.

Any help is greatly appreciated.