<commit_before>/**
 * Implement Gatsby's Node APIs in this file.
 *
 * See: https://www.gatsbyjs.org/docs/node-apis/
 */

// You can delete this file if you're not using it

const fetch = require('node-fetch')
const path = require(`path`)
const crypto = require('crypto')
const remark = require('remark')
const html = require('remark-html')

const { paginate } = require('gatsby-awesome-pagination')
const { postsPerPage } = require('./src/constants/blog.ts')

const MemberTemplate = path.resolve(`./src/templates/Member.tsx`)
const ProductTemplate = path.resolve(`src/templates/Product.tsx`)
const TagTemplate = path.resolve(`./src/templates/Tag.tsx`)
const BlogPostTemplate = path.resolve(`./src/templates/BlogPost.tsx`)
const BlogIndexTemplate = path.resolve(`./src/templates/BlogIndex.tsx`)

const markdownProcessor = remark().use(html)

const GhostAuthorType = `GhostAuthor`

const getHash = jawn =>
  crypto
    .createHash(`md5`)<commit_msg>throw error if missing env<commit_after>/**
 * Implement Gatsby's Node APIs in this file.
 *
 * NOTE these files which Gatsby builds on directly do not have TypeScript
 * support (hence the use of vanilla JS)
 */

const fetch = require('node-fetch')
const path = require(`path`)
const crypto = require('crypto')
const remark = require('remark')
const html = require('remark-html')

const { paginate } = require('gatsby-awesome-pagination')
const { postsPerPage } = require('./src/constants/blog.ts')

const MemberTemplate = path.resolve(`./src/templates/Member.tsx`)
const ProductTemplate = path.resolve(`src/templates/Product.tsx`)
const TagTemplate = path.resolve(`./src/templates/Tag.tsx`)
const BlogPostTemplate = path.resolve(`./src/templates/BlogPost.tsx`)
const BlogIndexTemplate = path.resolve(`./src/templates/BlogIndex.tsx`)

// Ensure that env is set correctly
const { GHOST_API_KEY } = process.env
if (!GHOST_API_KEY) {
  throw new Error('Missing GHOST_API_KEY in env')
}

const markdownProcessor = remark().use(html)

const GhostAuthorType = `GhostAuthor`

const getHash = jawn =>
  crypto
    .createHash(`md5`)
{'fraction_non_alphanumeric': 0.14134105161601543, 'fraction_numerical': 0.000964785335262904, 'mean_word_length': 4.908831908831909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '5472594', 'n_tokens_mistral': 639, 'n_tokens_neox': 632, 'n_words': 161}