<commit_before>import React from "react"
import PropTypes from "prop-types"

import classnames from 'classnames';

class CoverPage extends React.Component {
  render() {
    const { site, secondary, usePageTitle } = this.props;

    const { current, page, meta } = site;
    const { pageSize, image } = meta;

    const coverBackground = {
      backgroundImage: `url(${image})`
    };

    const ClsMainWrapper = classnames({
      'c-cover': true,
      '-short': (pageSize && pageSize === 'small') || secondary
    });

    return (
      <div className={ClsMainWrapper} style={coverBackground}>

        <div className="wrapper">
          <h2 className="cover-title">{usePageTitle ? page.name : current.name}</h2>
        </div>

        {image &&
          <div className="cover-attribution">
            {image.attribution_link &&
            <a target="_blank" href={image.instance.attribution_link}>{image.instance.attribution_label}</a>}

            {image.attribution_link && <p>{image.instance.attribution_label}</p>}
          </div>}

      </div><commit_msg>fix page header titles for subpages<commit_after>import React from "react"
import PropTypes from "prop-types"

import classnames from 'classnames';

class CoverPage extends React.Component {
  render() {
    const { site, secondary, usePageTitle } = this.props;

    const { current, page, meta } = site;
    const { pageSize, image } = meta;

    const coverBackground = {
      backgroundImage: `url(${image})`
    };

    const ClsMainWrapper = classnames({
      'c-cover': true,
      '-short': (pageSize && pageSize === 'small') || secondary
    });

    return (
      <div className={ClsMainWrapper} style={coverBackground}>

        <div className="wrapper">
          {/* content_type 3 === homepage */}
          {page.content_type !== 3 && <h2 className="cover-subtitle">{current.name}</h2>}
          <h2 className="cover-title">{page.name}</h2>
        </div>

        {image &&
          <div className="cover-attribution">
            {image.attribution_link &&
            <a target="_blank" href={image.instance.attribution_link}>{image.instance.attribution_label}</a>}

            {image.attribution_link && <p>{image.instance.attribution_label}</p>}
          </div>}

      </div>
{'fraction_non_alphanumeric': 0.14850615114235502, 'fraction_numerical': 0.0035149384885764497, 'mean_word_length': 2.826890756302521, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, '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': '1994927', 'n_tokens_mistral': 683, 'n_tokens_neox': 653, 'n_words': 143}