octopusthink / ghost-ship

A Gatsby starter template for websites & blogs. Designed for accessibility and SEO-friendliness.
MIT License
2 stars 0 forks source link

Site title should be inverted on homepage #31

Open sarahmonster opened 4 years ago

sarahmonster commented 4 years ago

Basically so this:

Welcome! · My Site

becomes

My Site · Welcome!

See https://github.com/octopusthink/octopusthink.com/pull/92 for some context.

octopusthink.com does this by passing a homepage prop to the SEO component, which works because the homepage is using a different template than the other pages. So we basically have two options here:

  1. Always use a separate template for the homepage. (Increases complexity needlessly for some uses.)
  2. Dynamically determine if we're on the homepage (maybe by inspecting the URL or the source filename?) and page the prop accordingly.

No. 2 seems like the much less fragile option here, but if it isn't a possible technically a better alternative might be to manually set a "homepage" flag to true in the homepage's front matter.

sarahmonster commented 4 years ago

@tofumatt do you know if there's a technically feasible way to accomplish no.2 on this list, or should I just opt for a no1-based solution?