Giter Site home page Giter Site logo

Comments (6)

WillGarman avatar WillGarman commented on July 16, 2024

So we have 2 options, we can pass the SEO details to <Layout/>. Or we can use the <SEO/> module that is already made.

Either way we can pass data from queries. I like the idea of having an SEO component on each page, it will be very easy to find and change SEO info.

Example:

return (
    <Layout>
      <SEO title={querydatahere} description="" keywords="" />
      ...

@raney24

from ainc-gatsby-sanity.

raney24 avatar raney24 commented on July 16, 2024

@WillGarman Let's use the <SEO> module, that makes more sense to me

from ainc-gatsby-sanity.

WillGarman avatar WillGarman commented on July 16, 2024

@raney24 I think we should come up with a system of giving page SEO details soon. Such as a Sanity doc or if we just want to hard code them in for now and go back later.

But just so we can start having it uniform for new pages built

Reference line 16:

 return (
        <Layout pageTitle="Salesforce | Awesome Inc">

(or just not worry about it for now and go back later and change all the pages)

from ainc-gatsby-sanity.

raney24 avatar raney24 commented on July 16, 2024

@WillGarman I like having a system right now. My thought is this flow:

  1. Check if page title is defined by sanity (not sure how we want to do this? This is maybe phase 2
  2. Use a variable defined in component
  3. Then implement like so:
// layout.js
<title>{ page.title } | Awesome Inc </title>

// {page_name}.js
const SamplePage = () => {

  pageTitle = "Sample Page"  // Do this because we can easily add a condition for if we ever use Sanity docs

  return (
    <Layout pageTitle={pageTitle}>
    ...
  )
}

from ainc-gatsby-sanity.

WillGarman avatar WillGarman commented on July 16, 2024

Looks good to me, do we want to just use the title in in the Layout tag instead of doing the SEO tag.

Also do we want to auto add | Awesome Inc to the end of every page. Just not sure if this will affect SEO.

from ainc-gatsby-sanity.

raney24 avatar raney24 commented on July 16, 2024

@WillGarman actually, it probably makes more sense to just use the <SEO> tag for title, description, and keywords. The same way I was describing above, but just inside <SEO> instead of <Layout>. To me, that makes more sense, Layout is more like design/looks. I could be convinced otherwise.

And yes, I think when we implement <SEO>, it should add | Awesome Inc to the end.

from ainc-gatsby-sanity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.