pycontw / pycontw-frontend

The official website for PyCon TW 🐍
16 stars 36 forks source link

[Feature Request] Adding more structured data for better SEO #103

Open hsuanchi opened 3 years ago

hsuanchi commented 3 years ago

Describe

1. Open Graph - All pages

Update the code under section of the page.

<meta property="og:title" content="{{default is same as page title}}">
<meta property="og:type" content="website">
<meta property=“og:url" content="{{same as canonical}}">
<meta property=“og:image" content="{{image URL links}}">
<meta property=“og:description" content="{{default is same as meta description}}">

2. Herflang 多國語系 - All pages

Ref. https://www.maxlist.xyz/2020/10/04/hreflang-seo-optimize/

<link rel="alternate" hreflang="x-default" href="{{https://tw.pycon.org/2021/en-us}}">
<link rel="alternate" hreflang="en-us" href="{{https://tw.pycon.org/2021/en-us}}">
<link rel="alternate" hreflang="zh-hant-tw" href="{{https://tw.pycon.org/2021/zh-hant}}">

3. Image Alt Text - All pages

Apply below image tags for all pages, only when an image is uploaded:

<img src="{{image link}}" alt="{{image description}}">

4. Organization Schema - Homepage

For homepage, please use organisation schema:  Ref. https://developers.google.com/search/docs/data-types/logo

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name":"PyCon Taiwan 2021", 
"url": "https://tw.pycon.org/2021/{{en-us}}, 
"logo": "{{use logo image on cdn**}}"
}
</script>

5. Job Posting part

Ref. https://developers.google.com/search/docs/data-types/job-posting

<script type="application/ld+json">
    {
      "@context" : "https://schema.org/",
      "@type" : "JobPosting",
      "title" : "Software Engineer",
      "description" : "<p>Google aspires to be an organization that reflects the globally diverse audience that our products and technology serve. We believe that in addition to hiring the best talent, a diversity of perspectives, ideas and cultures leads to the creation of better products and services.</p>",
      "identifier": {
        "@type": "PropertyValue",
        "name": "Google",
        "value": "1234567"
      },
      "datePosted" : "2017-01-18",
      "validThrough" : "2017-03-18T00:00",
      "employmentType" : "CONTRACTOR",
      "hiringOrganization" : {
        "@type" : "Organization",
        "name" : "Google",
        "sameAs" : "http://www.google.com",
        "logo" : "http://www.example.com/images/logo.png"
      },
      "jobLocation": {
      "@type": "Place",
        "address": {
        "@type": "PostalAddress",
        "streetAddress": "1600 Amphitheatre Pkwy",
        "addressLocality": "Mountain View",
        "addressRegion": "CA",
        "postalCode": "94043",
        "addressCountry": "US"
        }
      },
      "baseSalary": {
        "@type": "MonetaryAmount",
        "currency": "USD",
        "value": {
          "@type": "QuantitativeValue",
          "value": 40.00,
          "unitText": "HOUR"
        }
      }
    }
    </script>
mattwang44 commented 3 years ago

@hsuanchi For the Organization Schema part, I wonder what will happen if multiple scripts of the organization schema are existing on our website (e.g. two different versions of schema on the 2021 website & 2022 website)?

hsuanchi commented 3 years ago

@hsuanchi For the Organization Schema part, I wonder what will happen if multiple scripts of the organization schema are existing on our website (e.g. two different versions of schema on the 2021 website & 2022 website)?

ooo, It will be ok if we remove the info of year in the schema.

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name":"PyCon Taiwan", 
"url": "https://tw.pycon.org/", 
"logo": "{{use logo image on cdn**}}"
}
</script>
mattwang44 commented 3 years ago

1-4 are resolved by #112. we'll implement 5 after we get the data from sponsors