<commit_before>{% macro render_speaker(speaker, index) %}
{%- set complete_name = speaker.name + " " + speaker.last_name -%}

  <div class="speaker">
    <a href="{{ speaker | url }}" title="{{ complete_name }}"">
    <img class="speaker-image" id="speaker-image-link-{{ index }}" alt="{{ complete_name }}" src=
    {%- if speaker.image -%}
      "/speakers/{{ speaker._id }}/{{ speaker.image }}"
    {%- else -%}
      "/static/images/empty-photo.svg"
    {%- endif -%}
     />
     </a>
    <div id="link-{{ index }}" class="speaker-social">
      <a id="link-{{ index }}" class="social-hover" href="https://www.twitter.com/{{ speaker.twitter_handle }}" target="blank"><div class="social-icon icon-twitter"></div></a>
      <a id="link-{{ index }}" class="social-hover" href="{{ speaker.web }}" target="blank"><div class="social-icon icon-website"></div></a>
      <a id="link-{{ index }}" class="social-hover" href="https://www.github.com/{{ speaker.github_handle }}" target="blank"><div class="social-icon icon-github"></div></a>
    </div>
    <div class="speaker-details">
      <p>{{ complete_name }}</p>
      <div class="speaker-job">
        {% if speaker.display_summary %}
        <h5>{{ speaker.summary }}</h5>
        {% else%}
        <h5>{{ speaker.position }} {{ t_speaker_at }} {{ speaker.employer }}</h5>
        {% endif %}
      </div>
    </div>
  </div>
{% endmacro %}<commit_msg>Break speaker macro in several macros to make details optional.<commit_after>{% macro render_speaker_social(speaker, index=1) %}
  <div id="link-{{ index }}" class="speaker-social">
    <a id="link-{{ index }}" class="social-hover" href="https://www.twitter.com/{{ speaker.twitter_handle }}" target="blank"><div class="social-icon icon-twitter"></div></a>
    <a id="link-{{ index }}" class="social-hover" href="{{ speaker.web }}" target="blank"><div class="social-icon icon-website"></div></a>
    <a id="link-{{ index }}" class="social-hover" href="https://www.github.com/{{ speaker.github_handle }}" target="blank"><div class="social-icon icon-github"></div></a>
  </div>
{% endmacro %}

{% macro render_speaker_info(speaker) %}
  <div class="speaker-details">
    <p>{{ speaker.name }} {{speaker.last_name }}</p>
    <div class="speaker-job">
      {% if speaker.display_summary %}
      <h5>{{ speaker.summary }}</h5>
      {% else%}
      <h5>{{ speaker.position }} {{ t_speaker_at }} {{ speaker.employer }}</h5>
      {% endif %}
    </div>
  </div>
{% endmacro %}

{% macro render_speaker(speaker, index=1, details=True) %}
{%- set complete_name = speaker.name + " " + speaker.last_name -%}

  <div class="speaker">
    <a href="{{ speaker | url }}" title="{{ complete_name }}"">
    <img class="speaker-image" id="speaker-image-link-{{ index }}" alt="{{ complete_name }}" src=
    {%- if speaker.image -%}
      "/speakers/{{ speaker._id }}/{{ speaker.image }}"
    {%- else -%}
      "/static/images/empty-photo.svg"
    {%- endif -%}
     />
     </a>
    {% if details -%}
      {{ render_speaker_social(speaker, index) }}
      {{ render_speaker_info(speaker) }}
    {%- endif %}
  </div>
{% endmacro %}
{'fraction_non_alphanumeric': 0.2318050657261943, 'fraction_numerical': 0.0032061558191728116, 'mean_word_length': 3.3636363636363638, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '5192476', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1037, 'n_words': 198}