Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve page titles for SEO #4

Closed
wants to merge 1 commit into from
Closed

Improve page titles for SEO #4

wants to merge 1 commit into from

Conversation

croaky
Copy link
Contributor

@croaky croaky commented Dec 29, 2013

Google rewrites page titles in search results:

https://support.google.com/webmasters/answer/35624?hl=en

See the Trello card for screenshots of podcasts.thoughtbot.com page titles
being re-written in Google search results:

https://trello.com/c/3rO5yDi2

Since we can rely on Google adding "thoughtbot" and "podcast" to the page
title for search queries, this commit simplifies our page title strategy:

  • Home page: "thoughtbot podcasts"
  • Podcast page: "Giant Robots Smashing Into Other Giant Robots Podcast"
  • Episode page: "CoreFrustration (Reda Lemeden)"

Since we don't need Flutie's page_title method, and weren't using its
other method, body_class, it can be removed.

This commit also fixes a yield(:meta_description) || problem by using
yield(:meta_description).presence ||. yield without a content_for
returns an empty string, no nil.

All page title and meta description specs have been consolidated in the
spec/features/google_results_spec.rb file.

Google rewrites page titles in search results:

https://support.google.com/webmasters/answer/35624?hl=en

See the Trello card for screenshots of podcasts.thoughtbot.com page
titles being re-written in Google search results:

https://trello.com/c/3rO5yDi2

Since we can rely on Google adding "thoughtbot" and "podcast" to the
page title for search queries, this commit simplifies our page title
strategy:

* Home page: "thoughtbot podcasts"
* Podcast page: "Giant Robots Smashing Into Other Giant Robots Podcast"
* Episode page: "CoreFrustration (Reda Lemeden)"

Since we don't need Flutie's `page_title` method, and weren't using it's
other method, `body_class`, it can be removed.

This commit also fixes a `yield(:meta_description) ||` problem by using
`yield(:meta_description).presence ||`. `yield` without a `content_for`
returns an empty string, no `nil`.

All page title and meta description specs have been consolidated in the
spec/features/google_results_spec.rb file.
@cpytel
Copy link
Member

cpytel commented Dec 30, 2013

The code looks fine and ready to merge.

I've read through the docs, but I'm not sure I understand where our name comes from (I guess Thoughtbot Podcast in this case)

@croaky
Copy link
Contributor Author

croaky commented Dec 30, 2013

The code looks fine and ready to merge.

Thanks.

I've read through the docs, but I'm not sure I understand where our name comes from (I guess Thoughtbot Podcast in this case)

You mean on the SERP? Google is automatically adding it. It's looking at the keywords in the search and noticing that we have "podcasts" and "thoughtbot" in our domain name (and probably in the markup), so its algorithm thinks a better title to show in that particular search is to add those keywords.

@croaky croaky closed this Dec 30, 2013
@croaky croaky deleted the dc-meta-titles branch December 30, 2013 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants