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

Update meta tags #2325

Merged
merged 9 commits into from
Nov 5, 2019
Merged

Update meta tags #2325

merged 9 commits into from
Nov 5, 2019

Conversation

samajammin
Copy link
Member

Description

  • Builds off Add matomo #2323 (merge this first)
  • Add EIP numbers to page title tags to improve SEO rankings
  • Create dynamic meta descriptions (vs. using the same description for every page)

Example head tag output:

<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>
      EIP 875: Simpler NFT standard with batching and native atomic swaps
    </title>
    <meta
      property="og:title"
      content="EIP 875: Simpler NFT standard with batching and native atomic swaps"
    />
    <meta
      name="description"
      content="Details on Ethereum Improvement Proposal 875 (EIP 875): Simpler NFT standard with batching and native atomic swaps"
    />
    <meta
      property="og:description"
      content="Details on Ethereum Improvement Proposal 875 (EIP 875): Simpler NFT standard with batching and native atomic swaps"
    />
    <meta
      name="twitter:description"
      content="Details on Ethereum Improvement Proposal 875 (EIP 875): Simpler NFT standard with batching and native atomic swaps"
    />

    <meta name="generator" content="Jekyll v3.8.5" />
    <meta property="og:locale" content="en_US" />
    <link rel="canonical" href="https://eips.ethereum.org/EIPS/eip-875" />
    <meta property="og:url" content="https://eips.ethereum.org/EIPS/eip-875" />
    <meta property="og:site_name" content="Ethereum Improvement Proposals" />
    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="@ethereum" />
    <script type="application/ld+json">
      {
        "@type": "WebSite",
        "url": "https://eips.ethereum.org/",
        "name": "Ethereum Improvement Proposals",
        "description": "Ethereum Improvement Proposals (EIPs) describe standards for the Ethereum platform, including core protocol specifications, client APIs, and contract standards.",
        "@context": "https://schema.org"
      }
    </script>
    <link rel="stylesheet" href="/assets/css/style.css" />
    <link
      type="application/atom+xml"
      rel="alternate"
      href="http://localhost:4000/feed.xml"
      title="Ethereum Improvement Proposals"
    />
  </head>
</html>

Context

ethereum/ethereum-org-website#343

@axic
Copy link
Member

axic commented Oct 29, 2019

I think the meta tags are a worthy addition, can you make this PR independent of matomo?

@samajammin samajammin mentioned this pull request Oct 29, 2019
@axic axic added the type: Meta label Nov 1, 2019
@axic
Copy link
Member

axic commented Nov 1, 2019

@samajammin what do you think about changing this PR to be independent of matomo in order to merge it?

@samajammin
Copy link
Member Author

@axic thanks for the bump. I've removed Matomo from this PR, we can discuss that change in #2323

"@type": "WebSite",
"url": "https://eips.ethereum.org/",
"name": "Ethereum Improvement Proposals",
"description": "Ethereum Improvement Proposals (EIPs) describe standards for the Ethereum platform, including core protocol specifications, client APIs, and contract standards.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to get these fields and the URL from _config.yml ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually made this change myself, hope you don't mind.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@axic
Copy link
Member

axic commented Nov 1, 2019

@nicksavers @Arachnid @Souptacular any comments on this? I suggest to merge it.

@axic axic mentioned this pull request Nov 1, 2019
@@ -0,0 +1,5 @@
---
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, this is needed since we're know using a custom head that references the file. Learn more here: https://github.com/jekyll/minima#customizing-templates

@fulldecent
Copy link
Contributor

The og: and twitter: prefixed descriptions provide no new content versus description. My understanding is that description is the default for all parsers and therefore those two tags are duplicative. So they can be removed.

Normally I would cite an authoritative reference when talking about a specification like OGP. However, OPG does not have a publicly downloadable specification, the forums are not publicly accessible. And the reference implementation (Facebook's) is not publicly downloadable.

@fulldecent
Copy link
Contributor

Likewise for og:url.

@Souptacular
Copy link
Contributor

After @fulldecent's comments are addressed I agree we should merge @axic.

@samajammin
Copy link
Member Author

@fulldecent are you certain of this? The Facebook Debugger references og:title, og:url & og:description & even raises a warning that those properties are not currently present:
https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Feips.ethereum.org%2F

Image 2019-11-04 at 2 07 19 PM

@fulldecent
Copy link
Contributor

@samajammin Fair enough. If that tool (I can't access it) "says should be fixed" then I agree it should be added.

Also the OG specification should be updated to not complain about inferred values, to avoid polluting vendored tagging. But that's a complaint for OG, not here.

@samajammin
Copy link
Member Author

Haha, agreed. And bummer, I suppose you must be logged into Facebook in order to access their debugger tool? Classic Facebook move...

@Souptacular Souptacular merged commit 8350c1f into ethereum:master Nov 5, 2019
@Souptacular
Copy link
Contributor

Looks good. Merging.

ilanolkies pushed a commit to ilanolkies/EIPs that referenced this pull request Nov 12, 2019
* Add Matomo tracking

* Add development instructions to README

* Add dynamic metadata for EIP pages

* Escape title strings

* Remove Matomo

* Use variables from _config.yaml in head.html

* Omit Jekyll version from header

* Also use twitter_username from _config.yml
MadeofTin pushed a commit to MadeofTin/EIPs that referenced this pull request Nov 13, 2019
* Add Matomo tracking

* Add development instructions to README

* Add dynamic metadata for EIP pages

* Escape title strings

* Remove Matomo

* Use variables from _config.yaml in head.html

* Omit Jekyll version from header

* Also use twitter_username from _config.yml
tkstanczak pushed a commit to tkstanczak/EIPs that referenced this pull request Nov 7, 2020
* Add Matomo tracking

* Add development instructions to README

* Add dynamic metadata for EIP pages

* Escape title strings

* Remove Matomo

* Use variables from _config.yaml in head.html

* Omit Jekyll version from header

* Also use twitter_username from _config.yml
Arachnid pushed a commit to Arachnid/EIPs that referenced this pull request Mar 6, 2021
* Add Matomo tracking

* Add development instructions to README

* Add dynamic metadata for EIP pages

* Escape title strings

* Remove Matomo

* Use variables from _config.yaml in head.html

* Omit Jekyll version from header

* Also use twitter_username from _config.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants