<commit_before>YAML = require 'js-yaml'
React = require 'react'

{ read } = require '../lib/utils.coffee'
Elements = require '../src/scripts/elements.coffee'

conf = YAML.safeLoad read './config.yaml'

server = ''
if conf.assetServer
  server = '//' + conf.assetServer.hostname + ':' + conf.assetServer.port
assetPaths = conf.assetPaths || require '../dist/webpack-assets.json'

{ html, head, meta, title, link, body, header, div, script } = Elements

googleFontsUrl = '//fonts.googleapis.com/css?family='
stylesheets = [
  googleFontsUrl + 'Open+Sans:400,400italic,700,700italic,800italic'
  googleFontsUrl + 'Rokkitt:400,700'
  server + assetPaths.styles.css
]

module.exports = React.createClass
  render: ->
    metadata = [
      meta charSet: 'utf-8'
      meta name: 'viewport', content: 'width=device-width, initial-scale=1'
      title(@props.title)
    ].concat stylesheets.map (href) ->
        link rel: 'stylesheet', href: href
    html(
      { lang: @props.lang }
      head metadata
      body(
        div id: 'app', innerHtml: @props.app
        script
          id: 'state', type: 'application/json'
          JSON.stringify @props.state
        script src: server + assetPaths.scripts.js
      )
    )<commit_msg>Added link to feed.<commit_after>YAML = require 'js-yaml'
React = require 'react'

{ read } = require '../lib/utils.coffee'
Elements = require '../src/scripts/elements.coffee'

conf = YAML.safeLoad read './config.yaml'

server = ''
if conf.assetServer
  server = '//' + conf.assetServer.hostname + ':' + conf.assetServer.port
assetPaths = conf.assetPaths || require '../dist/webpack-assets.json'

{ html, head, meta, title, link, body, header, div, script } = Elements

googleFontsUrl = '//fonts.googleapis.com/css?family='
stylesheets = [
  googleFontsUrl + 'Open+Sans:400,400italic,700,700italic,800italic'
  googleFontsUrl + 'Rokkitt:400,700'
  server + assetPaths.styles.css
]

module.exports = React.createClass
  render: ->
    metadata = [
      meta charSet: 'utf-8'
      meta name: 'viewport', content: 'width=device-width, initial-scale=1'
      title(@props.title)
      link
        rel: 'alternate'
        type: 'application/atom+xml'
        title: @props.title
        href: '/index.atom'
    ].concat stylesheets.map (href) ->
        link rel: 'stylesheet', href: href
    html(
      { lang: @props.lang }
      head metadata
      body(
        div id: 'app', innerHtml: @props.app
        script
          id: 'state', type: 'application/json'
          JSON.stringify @props.state
        script src: server + assetPaths.scripts.js
      )
    )
{'fraction_non_alphanumeric': 0.14417531718569782, 'fraction_numerical': 0.01768550557477893, 'mean_word_length': 2.906906906906907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '2804270', 'n_tokens_mistral': 879, 'n_tokens_neox': 835, 'n_words': 190}