<commit_before>{% capture page_url %}{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html','' }}{% endcapture %}
{% capture description %}{% if page.description %}{{ page.description | strip_html | strip_newlines }}{% else %}{{ site.description }}{% endif %}{% endcapture %}
{% capture id_number %}{{ collection.id_0 }}{% if collection.id_1 %}.{{ collection.id_1 }}{% endif %}{% if collection.id_2 %}.{{ collection.id_2 }}{% endif %}{% if collection.id_3 %}.{{ collection.id_3 }}{% endif %}{% endcapture %}

{
  "@context": "http://schema.org/",
  "@type": "Collection",
  "name": "{{collection.title}}",
  "description": "{{description}}",
  "datePublished": "<< Finding Aid Date >>",
  {% for agent in agents %}
    {% if {{agent.role}} == 'creator' %}
      {% if agent.ref %}
          <!-- there is an external .json file to read agent_detail from -->
          {% if agent.ref contains "corporate_entities" %}
            {% assign type = "Organization" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/corporate_entities/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.corporate_entities[{{id}}] %}
          {% elsif agent.ref contains "families" %}
            {% assign type = "Person" %}
            {% assign label = "familyName" %}
            {% capture id %}{{agent.ref | replace: '/agents/families/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.families[{{id}}] %}
          {% elsif agent.ref contains "people" %}
            {% assign type = "Person" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/people/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.people[{{id}}] %}
          {% endif %}
      {% else %}
        <!-- no external .json file - just use agent as agent_detail -->
        {% assign agent_detail = agent %}
        {% assign type = false %}
        {% assign label = false %}
        {% assign id = false %}
      {% endif %}
      {% if agent_detail %}
  "creator": [
        {
        {% if type and id %}
            "@type": "{{type}}",
            "@id": "{{site.url}}{{site.baseurl}}/{{type}}/{{id}}",
            "{{label}}": "{{agent_detail.title}}"
        {% else %}
            "@type": "Thing",
            "name": "{{agent_detail.title}}"
      {% endif %}
        }
        {% if forloop.last == false %}
        ,
        {% endif %}
  ],
      {% endif %}
    {% elseif {{agent.role}} == 'contributor' %}
      {% if agent.ref %}
          <!-- there is an external .json file to read agent_detail from -->
          {% if agent.ref contains "corporate_entities" %}
            {% assign type = "Organization" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/corporate_entities/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.corporate_entities[{{id}}] %}
          {% elsif agent.ref contains "families" %}
            {% assign type = "Person" %}
            {% assign label = "familyName" %}
            {% capture id %}{{agent.ref | replace: '/agents/families/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.families[{{id}}] %}
          {% elsif agent.ref contains "people" %}
            {% assign type = "Person" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/people/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.people[{{id}}] %}
          {% endif %}
      {% else %}
        <!-- no external .json file - just use agent as agent_detail -->
          {% assign agent_detail = agent %}
          {% assign type = false %}
          {% assign label = false %}
          {% assign id = false %}
      {% endif %}
      {% if agent_detail %}
  "contributor": [
        {
          {% if type and id %}
            "@type": "{{type}}",
            "@id": "{{site.url}}{{site.baseurl}}/{{type}}/{{id}}",
            "{{label}}": "{{agent_detail.title}}"
          {% else %}
            "@type": "Thing",
            "name": "{{agent_detail.title}}"
          {% endif %}
        }
          {% if forloop.last == false %}
        ,
          {% endif %}
  ],
      {% endif %}
    {% endif %}  
  {% endfor %}
    "temporalCoverage": "{{collection.dates[0].expression}}",
    {% for subject in subjects %}
      {% if subject.ref %}
        {% capture subject_id %}{{subject.ref | replace: '/subjects/', ''}}{% endcapture %}
        {% assign subject_detail = site.data.subjects[{{subject_id}}] %}
      {% else %}
        {% assign subject_detail = subject %}
      {% endif %}
    "about": [
      "{{subject_detail.title}}"
    {% if forloop.last == false %}
      ,
     {% endif %}
        ],
    {% endfor %}
  "url": "{{page_url}}",
  "offers": {
      "@type": "Offer",
      "availability": "https://schema.org/InStoreOnly",
      "serialNumber": "{{id_number}}",<commit_msg>Update collections-json-ld.html<commit_after>{% capture page_url %}{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html','' }}{% endcapture %}
{% capture description %}{% if page.description %}{{ page.description | strip_html | strip_newlines }}{% else %}{{ site.description }}{% endif %}{% endcapture %}
{% capture id_number %}{{ collection.id_0 }}{% if collection.id_1 %}.{{ collection.id_1 }}{% endif %}{% if collection.id_2 %}.{{ collection.id_2 }}{% endif %}{% if collection.id_3 %}.{{ collection.id_3 }}{% endif %}{% endcapture %}

{
  "@context": "http://schema.org/",
  "@type": "Collection",
  "name": "{{collection.title}}",
  "description": "{{description}}",
  "datePublished": "<< Finding Aid Date >>",
  {% for agent in agents %}
    {% if {{agent.role}} == 'creator' %}
      {% if agent.ref %}
          <!-- there is an external .json file to read agent_detail from -->
          {% if agent.ref contains "corporate_entities" %}
            {% assign type = "Organization" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/corporate_entities/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.corporate_entities[{{id}}] %}
          {% elsif agent.ref contains "families" %}
            {% assign type = "Person" %}
            {% assign label = "familyName" %}
            {% capture id %}{{agent.ref | replace: '/agents/families/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.families[{{id}}] %}
          {% elsif agent.ref contains "people" %}
            {% assign type = "Person" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/people/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.people[{{id}}] %}
          {% endif %}
      {% else %}
        <!-- no external .json file - just use agent as agent_detail -->
        {% assign agent_detail = agent %}
        {% assign type = false %}
        {% assign label = false %}
        {% assign id = false %}
      {% endif %}
      {% if agent_detail %}
  "creator": [
        {% if type and id %}
        {
            "@type": "{{type}}",
            "@id": "{{site.url}}{{site.baseurl}}/{{type}}/{{id}}",
            "{{label}}": "{{agent_detail.title}}"
        {% else %}
        {
            "@type": "Thing",
            "name": "{{agent_detail.title}}"
      {% endif %}
        }
        {% if forloop.last == false %}
        ,
        {% endif %}
  ],
      {% endif %}
    {% elseif {{agent.role}} == 'contributor' %}
      {% if agent.ref %}
          <!-- there is an external .json file to read agent_detail from -->
          {% if agent.ref contains "corporate_entities" %}
            {% assign type = "Organization" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/corporate_entities/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.corporate_entities[{{id}}] %}
          {% elsif agent.ref contains "families" %}
            {% assign type = "Person" %}
            {% assign label = "familyName" %}
            {% capture id %}{{agent.ref | replace: '/agents/families/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.families[{{id}}] %}
          {% elsif agent.ref contains "people" %}
            {% assign type = "Person" %}
            {% assign label = "name" %}
            {% capture id %}{{agent.ref | replace: '/agents/people/', '' }}{% endcapture %}
            {% assign agent_detail = site.data.agents.people[{{id}}] %}
          {% endif %}
      {% else %}
        <!-- no external .json file - just use agent as agent_detail -->
          {% assign agent_detail = agent %}
          {% assign type = false %}
          {% assign label = false %}
          {% assign id = false %}
      {% endif %}
      {% if agent_detail %}
  "contributor": [
          {% if type and id %}
        {
            "@type": "{{type}}",
            "@id": "{{site.url}}{{site.baseurl}}/{{type}}/{{id}}",
            "{{label}}": "{{agent_detail.title}}"
          {% else %}
        {
            "@type": "Thing",
            "name": "{{agent_detail.title}}"
          {% endif %}
        }
          {% if forloop.last == false %}
        ,
          {% endif %}
  ],
      {% endif %}
    {% endif %}  
  {% endfor %}
    "temporalCoverage": "{{collection.dates[0].expression}}",
    {% for subject in subjects %}
      {% if subject.ref %}
        {% capture subject_id %}{{subject.ref | replace: '/subjects/', ''}}{% endcapture %}
        {% assign subject_detail = site.data.subjects[{{subject_id}}] %}
      {% else %}
        {% assign subject_detail = subject %}
      {% endif %}
    "about": [
      "{{subject_detail.title}}"
    {% if forloop.last == false %}
      ,
     {% endif %}
        ],
    {% endfor %}
  "url": "{{page_url}}",
  "offers": {
      "@type": "Offer",
      "availability": "https://schema.org/InStoreOnly",
      "serialNumber": "{{id_number}}",
{'fraction_non_alphanumeric': 0.20320802991537099, 'fraction_numerical': 0.001574493209998032, 'mean_word_length': 2.0565413533834587, 'pattern_counts': {'":': 48, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '237004', 'n_tokens_mistral': 3354, 'n_tokens_neox': 2963, 'n_words': 662}