public function archiveTitle(array $config = array())
    {
        $defaults = array(
            'default'      => 'Archive',
            'prefix'       => '',
            'suffix'       => '',
            'year_format'  => 'Y',
            'month_format' => 'F Y',
            'day_format'   => 'jS F Y'
        );

        $config = array_merge($defaults, $config);

        $title = $config['default'];

        if (is_category() || is_tag() || is_tax()) {
            $title = single_term_title('', false);
        } elseif (is_year()) {
            $title = Carbon::create(
                get_query_var('year')
            )->format($config['year_format']);
        } elseif (is_month()) {
            $title = Carbon::create(
                get_query_var('year') ?: null,
                get_query_var('monthnum')
            )->format($config['month_format']);
        } elseif (is_day()) {
            $title = Carbon::create(
                get_query_var('year') ?: null,
                get_query_var('monthnum') ?: null,
                get_query_var('day')
            )->format($config['day_format']);
        }

        return $config['prefix'] . $title . $config['suffix'];
    }