<commit_before>module.exports = (options, callback)->

  getStyles    = require './../styleblock'
  fetchScripts = require './../scriptblock'
  getSidebar   = require './sidebar'
  encoder      = require 'htmlencode'

  {
    account, slug, title, content, body,
    avatar, counts, policy, customize,
    bongoModels, client
  } = options

  prepareHTML = (scripts)->
    """

    <!DOCTYPE html>
    <html>
    <head>
      <title>#{encoder.XSSEncode title}</title>
      #{getStyles()}
    </head>
    <body class="group">

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

    #{KONFIG.getConfigScriptTag {entryPoint: { slug : slug, type: "group"}, roles:['guest'], permissions:[]}}
    #{scripts}
    </body>
    </html>

    """

  fetchScripts {bongoModels, client}, (err, scripts)->
    callback null, prepareHTML scripts<commit_msg>grouphome: pass group slug as parameter to fetchScripts<commit_after>module.exports = (options, callback)->

  getStyles    = require './../styleblock'
  fetchScripts = require './../scriptblock'
  getSidebar   = require './sidebar'
  encoder      = require 'htmlencode'

  {
    account, slug, title, content, body,
    avatar, counts, policy, customize,
    bongoModels, client
  } = options

  prepareHTML = (scripts)->
    """

    <!DOCTYPE html>
    <html>
    <head>
      <title>#{encoder.XSSEncode title}</title>
      #{getStyles()}
    </head>
    <body class="group">

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

    #{KONFIG.getConfigScriptTag {entryPoint: { slug : slug, type: "group"}, roles:['guest'], permissions:[]}}
    #{scripts}
    </body>
    </html>

    """

  fetchScripts {bongoModels, client, slug}, (err, scripts)->
    callback null, prepareHTML scripts
{'fraction_non_alphanumeric': 0.18063112078346028, 'fraction_numerical': 0.0, 'mean_word_length': 3.208237986270023, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 0, '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': '3519973', 'n_tokens_mistral': 598, 'n_tokens_neox': 575, 'n_words': 129}