<commit_before>// Only used on server

const React = require('react')

module.exports = (props) => {
  const {
    htmlAttributes,
    title,
    meta,
    body,
    mainJs,
    mainCss,
    url,
    imageUrl,
    appId
  } = props

  return (
    <html {...htmlAttributes}>
      <head>
        {meta}
        <meta data-react-helmet='true' property='og:url' content={url} />
        <meta data-react-helmet='true' property='og:image' content={imageUrl} />
        <meta property='fb:app_id' content={appId} />

        {title}
        <link rel='stylesheet' href={mainCss} />
        <link rel='shortcut icon' type='image/png' href='/public/favicon.ico' />
        <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet" />
      </head>
      <body>
        <div id="app-container">
          <div dangerouslySetInnerHTML={{ __html: body }} />
        </div>

        <script src={mainJs}></script>
      </body>
    </html>
  )
}
<commit_msg>Added og:image:width and og:image:height meta properties to server-side rendered HTML.<commit_after>// Only used on server

const React = require('react')

module.exports = (props) => {
  const {
    htmlAttributes,
    title,
    meta,
    body,
    mainJs,
    mainCss,
    url,
    imageUrl,
    appId
  } = props

  return (
    <html {...htmlAttributes}>
      <head>
        {meta}
        <meta data-react-helmet='true' property='og:url' content={url} />
        <meta data-react-helmet='true' property='og:image' content={imageUrl} />
        {/* explanation of og:image:width and :height - https://developers.facebook.com/docs/sharing/best-practices/#precaching */}
        <meta property='og:image:width' content='1200' />
        <meta property='og:image:height' content='750' />
        <meta property='fb:app_id' content={appId} />

        {title}
        <link rel='stylesheet' href={mainCss} />
        <link rel='shortcut icon' type='image/png' href='/public/favicon.ico' />
        <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet" />
      </head>
      <body>
        <div id="app-container">
          <div dangerouslySetInnerHTML={{ __html: body }} />
        </div>

        <script src={mainJs}></script>
      </body>
    </html>
  )
}

{'fraction_non_alphanumeric': 0.1664459161147903, 'fraction_numerical': 0.0030905077262693157, 'mean_word_length': 2.4915254237288136, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, 'https://': 3, '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': '4192006', 'n_tokens_mistral': 746, 'n_tokens_neox': 729, 'n_words': 145}