<commit_before>module.exports = (options, callback)->
  {account, client, bongoModels} = options
  getStyles       = require './../styleblock'
  fetchScripts    = require './../scriptblock'
  getTitle        = require './../title'
  getGraphMeta    = require './../graphmeta'

  entryPoint         = { slug : "koding", type: "group" }
  options.entryPoint = entryPoint

  prepareHTML = (scripts)->
    """
    <!doctype html>
    <html lang="en">
    <head>
      #{getTitle()}
      #{getGraphMeta()}
      #{getStyles()}
    </head>
    <body class='logged-in'>

      <!--[if IE]><script>(function(){window.location.href='/unsupported.html'})();</script><![endif]-->

      #{KONFIG.getConfigScriptTag { entryPoint, roles: ['member'], permissions: [] } }
      <script>KD.isLoggedInOnLoad=true;</script>
      #{scripts}

    </body>
    </html>
    """

  fetchScripts options, (err, scripts)->
    callback null, prepareHTML scripts

<commit_msg>seo: update meta data with specific activity information when a user accesses a post<commit_after>module.exports = (options, callback)->
  {account, client, bongoModels, models} = options
  getStyles       = require './../styleblock'
  fetchScripts    = require './../scriptblock'
  getTitle        = require './../title'
  getGraphMeta    = require './../graphmeta'
  {argv}          = require 'optimist'
  {uri}           = require('koding-config-manager').load("main.#{argv.c}")

  entryPoint         = { slug : "koding", type: "group" }
  options.entryPoint = entryPoint

  prepareHTML = (scripts, socialApiData)->
    if socialApiData
      {navigated} = socialApiData
      {slug, data:{message}} = navigated
      {body} = message

      summary = body.slice(0, 80)
      title = "#{summary} | Koding Community"

      url = if uri?.address then uri.address else "https://koding.com/"
      shareUrl = "#{url}/#{slug}"

    """
    <!doctype html>
    <html lang="en">
    <head>
      #{getTitle title: title }
      #{getGraphMeta shareUrl: shareUrl, body: body}
      #{getStyles()}
    </head>
    <body class='logged-in'>

      <!--[if IE]><script>(function(){window.location.href='/unsupported.html'})();</script><![endif]-->

      #{KONFIG.getConfigScriptTag { entryPoint, roles: ['member'], permissions: [] } }
      <script>KD.isLoggedInOnLoad=true;</script>
      #{scripts}

    </body>
    </html>
    """

  fetchScripts options, (err, scripts, socialApiData)->
    callback null, prepareHTML scripts, socialApiData


{'fraction_non_alphanumeric': 0.17389558232931726, 'fraction_numerical': 0.0012048192771084338, 'mean_word_length': 2.8205521472392636, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 1, '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': '935135', 'n_tokens_mistral': 777, 'n_tokens_neox': 772, 'n_words': 169}