<commit_before><% summary = strip_tags stripdown(@actionPage.summary) -%>
<%
    image_url = if @actionPage.image.exists?
                  image_url(@actionPage.image.to_s)
                else
                  image_url("og-image-default.png")
                end
-%>

<meta name='description' content='<%= summary -%>'>
<meta property='og:type' content='article'>
<meta property='og:url' content='<%= action_page_url(@actionPage) -%>'>
<meta property='og:title' content='<%= @actionPage.og_title -%>'>
<meta property='og:description' content='<%= summary -%>'>
<meta property='og:image' content='<%= asset_path(image_url) -%>'>
<meta property='og:image:secure_url' content='<%= asset_path(image_url) -%>'>
<% if fb = Rails.application.config.facebook_handle %>
  <meta property='article:publisher' content='https://www.facebook.com/<%= fb -%>'>
<% end %>

<meta name='twitter:card' content='summary_large_image'>
<meta name='twitter:site' content='<%= twitter_handle -%>'>
<meta name='twitter:creator' content='<%= twitter_handle -%>'>
<meta name='twitter:image:src' content='<%= asset_path(image_url) -%>'>
<meta name='twitter:title' content='<%= @actionPage.og_title -%>'>
<meta name='twitter:description' content='<%= summary -%>'>

<commit_msg>Check if an image is present more safely<commit_after><% summary = strip_tags stripdown(@actionPage.summary) -%>
<%
    image_url = if @actionPage.image.try(:exists?)
                  image_url(@actionPage.image.to_s)
                else
                  image_url("og-image-default.png")
                end
-%>

<meta name='description' content='<%= summary -%>'>
<meta property='og:type' content='article'>
<meta property='og:url' content='<%= action_page_url(@actionPage) -%>'>
<meta property='og:title' content='<%= @actionPage.og_title -%>'>
<meta property='og:description' content='<%= summary -%>'>
<meta property='og:image' content='<%= asset_path(image_url) -%>'>
<meta property='og:image:secure_url' content='<%= asset_path(image_url) -%>'>
<% if fb = Rails.application.config.facebook_handle %>
  <meta property='article:publisher' content='https://www.facebook.com/<%= fb -%>'>
<% end %>

<meta name='twitter:card' content='summary_large_image'>
<meta name='twitter:site' content='<%= twitter_handle -%>'>
<meta name='twitter:creator' content='<%= twitter_handle -%>'>
<meta name='twitter:image:src' content='<%= asset_path(image_url) -%>'>
<meta name='twitter:title' content='<%= @actionPage.og_title -%>'>
<meta name='twitter:description' content='<%= summary -%>'>


{'fraction_non_alphanumeric': 0.21009065825778478, 'fraction_numerical': 0.0, 'mean_word_length': 5.220588235294118, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1446487', 'n_tokens_mistral': 880, 'n_tokens_neox': 826, 'n_words': 145}