<commit_before>const path = require('path');
const select = require('unist-util-select');
const { head } = require('lodash');

const { isAStubRE } = require('../regEx');

const guideArticle = path.resolve(
  __dirname,
  '../../src/templates/Guide/GuideArticle.js'
);

exports.createGuideArticlePages = createPage => ({
  node: {
    htmlAst,
    excerpt,
    fields: { slug, component },
    id
  }
}) => {
  let meta = {};

  if (!isAStubRE.test(excerpt)) {
    const featureImage = head(select(htmlAst, 'element[tagName=img]'));
    meta.featureImage = featureImage
      ? featureImage.properties.src
      : 'https://s3.amazonaws.com/freecodecamp' +
        '/reecodecamp-square-logo-large.jpg';

    const description = head(select(htmlAst, 'element[tagName=p]'));
    meta.description = description ? description.children[0].value : '';
  }

  return createPage({
    path: `/guide${slug}`,
    component: !component
      ? guideArticle<commit_msg>fix: adding f to the featureImage source (#35758)<commit_after>const path = require('path');
const select = require('unist-util-select');
const { head } = require('lodash');

const { isAStubRE } = require('../regEx');

const guideArticle = path.resolve(
  __dirname,
  '../../src/templates/Guide/GuideArticle.js'
);

exports.createGuideArticlePages = createPage => ({
  node: {
    htmlAst,
    excerpt,
    fields: { slug, component },
    id
  }
}) => {
  let meta = {};

  if (!isAStubRE.test(excerpt)) {
    const featureImage = head(select(htmlAst, 'element[tagName=img]'));
    meta.featureImage = featureImage
      ? featureImage.properties.src
      : 'https://s3.amazonaws.com/freecodecamp' +
        '/freecodecamp-square-logo-large.jpg';

    const description = head(select(htmlAst, 'element[tagName=p]'));
    meta.description = description ? description.children[0].value : '';
  }

  return createPage({
    path: `/guide${slug}`,
    component: !component
      ? guideArticle
{'fraction_non_alphanumeric': 0.1641867624422781, 'fraction_numerical': 0.004617752693689072, 'mean_word_length': 3.55607476635514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '3505288', 'n_tokens_mistral': 645, 'n_tokens_neox': 613, 'n_words': 112}