Skip to content

Commit

Permalink
Further SEO Page Title Refinements steemit#332 (steemit#333)
Browse files Browse the repository at this point in the history
- Ensure all titles are always first letter capitalized (consistency and user readability)

- Further tweaks to page titles with no category/tag selected
  • Loading branch information
originated authored and Valentine Zavgorodnev committed Sep 23, 2016
1 parent cf28411 commit a9b165b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/components/modules/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,12 @@ class Header extends React.Component {
page_title = `${sort_order} ${topic} posts`;
}
} else {
page_title = `${sort_order} posts`;
if (route.params[0] === "created") {
page_title = `New posts`;
}
else {
page_title = `${sort_order} posts`;
}
}
}
} else if (route.page === 'Post') {
Expand Down Expand Up @@ -119,6 +124,9 @@ class Header extends React.Component {
page_name = ''; //page_title = route.page.replace( /([a-z])([A-Z])/g, '$1 $2' ).toLowerCase();
}

// Always format first letter of all titles capitalized for consistency & readability
page_title = page_title.charAt(0).toUpperCase() + page_title.slice(1);

if (process.env.BROWSER && route.page !== 'Post') document.title = page_title + ' — Steemit';

const logo_link = route.params && route.params.length > 1 && this.last_sort_order ? '/' + this.last_sort_order : (current_account_name ? `/@${current_account_name}/feed` : '/');
Expand Down

0 comments on commit a9b165b

Please sign in to comment.