Skip to content

Commit

Permalink
Merge pull request #14228 from ethereum/meta-titles
Browse files Browse the repository at this point in the history
SEO update meta titles
  • Loading branch information
corwintines authored Dec 17, 2024
2 parents 31660ce + 3344f18 commit efb623b
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 18 deletions.
3 changes: 2 additions & 1 deletion public/content/dao/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Decentralized autonomous organizations (DAOs)
title: What is a DAO?
metaTitle: What is a DAO? | Decentralized Autonomous Organization
description: An overview of DAOs on Ethereum
lang: en
template: use-cases
Expand Down
1 change: 1 addition & 0 deletions public/content/defi/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Decentralized finance (DeFi)
metaTitle: What is DeFi? | Benefits and Use of Decentralised Finance
description: An overview of DeFi on Ethereum
lang: en
template: use-cases
Expand Down
1 change: 1 addition & 0 deletions public/content/developers/docs/gas/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Gas and fees
metaTitle: "Ethereum gas and fees: technical overview"
description:
lang: en
---
Expand Down
1 change: 1 addition & 0 deletions public/content/guides/how-to-use-a-wallet/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: How to use a wallet
metaTitle: How to use Ethereum Wallets | Step by Step
description: A guide explaining how to send, receive tokens and connect to web3 projects.
lang: en
---
Expand Down
1 change: 1 addition & 0 deletions public/content/nft/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Non-fungible tokens (NFT)
metaTitle: What are NFTs? | Benefits and use
description: An overview of NFTs on Ethereum
lang: en
template: use-cases
Expand Down
1 change: 1 addition & 0 deletions public/content/smart-contracts/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Smart contracts
metaTitle: "Smart contracts: What are the and benefits"
description: A non-technical introduction to smart contracts
lang: en
---
Expand Down
7 changes: 3 additions & 4 deletions src/components/PageMetadata.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const PageMetadata = ({

const desc = description || t("site-description")
const siteTitle = t("site-title")
const fullTitle = `${title} | ${siteTitle}`

// Remove any query params (?) or hash links (#)
const path = asPath.replace(/[?#].*/, "")
Expand All @@ -66,10 +65,10 @@ const PageMetadata = ({
{ name: `twitter:card`, content: `summary_large_image` },
{ name: `twitter:creator`, content: author || siteTitle },
{ name: `twitter:site`, content: author || siteTitle },
{ name: `twitter:title`, content: fullTitle },
{ name: `twitter:title`, content: title },
{ name: `twitter:description`, content: desc },
{ name: `twitter:image`, content: ogImageUrl },
{ property: `og:title`, content: fullTitle },
{ property: `og:title`, content: title },
{ property: `og:locale`, content: locale! },
{ property: `og:description`, content: desc },
{ property: `og:type`, content: `website` },
Expand All @@ -80,7 +79,7 @@ const PageMetadata = ({

return (
<Head>
<title>{fullTitle}</title>
<title>{title}</title>
{metadata.map((data) => (
<meta
key={(data as NameMeta).name || (data as PropMeta).property}
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-gas.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"page-gas-meta-title": "Gas fees on Ethereum: how do they work?",
"page-gas-meta-title": "Ethereum fees: what is gas and how to pay less?",
"page-gas-meta-description": "Learn about gas on Ethereum: how they work and how to pay less in gas fees",
"page-gas-hero-title": "Gas fees",
"page-gas-hero-header": "Network fees",
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-get-eth.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"page-get-eth-hero-image-alt": "Get ETH hero image",
"page-get-eth-keep-it-safe": "Keeping your ETH safe",
"page-get-eth-meta-description": "How to buy ETH based on where you live and advice on how to look after it.",
"page-get-eth-meta-title": "How to get ETH",
"page-get-eth-meta-title": "How to buy Ethereum (ETH)",
"page-get-eth-need-wallet": "You will need a wallet to use a DEX.",
"page-get-eth-new-to-eth": "New to ETH? Here's an overview to get you started.",
"page-get-eth-other-cryptos": "Buy with other crypto",
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"page-index-learn-tag": "Learn",
"page-index-learn-header": "Understand Ethereum",
"page-index-meta-description": "Ethereum is a global, decentralized platform for money and new kinds of applications. On Ethereum, you can write code that controls money, and build applications accessible anywhere in the world.",
"page-index-meta-title": "The complete guide to Ethereum",
"page-index-meta-title": "Ethereum.org: The complete guide to Ethereum",
"page-index-network-stats-total-eth-staked": "Value protecting Ethereum",
"page-index-network-stats-tx-cost-description": "Average transaction cost",
"page-index-network-stats-tx-day-description": "Transactions in the last 24h",
Expand Down
1 change: 0 additions & 1 deletion src/intl/en/page-layer-2.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{

}
1 change: 1 addition & 0 deletions src/intl/en/page-learn.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"hero-header": "Learn about Ethereum",
"hero-subtitle": "Your educational guide to the world of Ethereum. Learn how Ethereum works and how to connect to it. This page includes technical and non-technical articles, guides, and resources.",
"hero-button-lets-get-started": "Let's get started",
"page-learn-meta-title": "Ethereum: A Comprehensive Learning Guide",
"what-is-crypto-1": "You may have heard about cryptocurrencies, blockchains and Bitcoin. The links below will help you learn what they are and how they relate to Ethereum.",
"what-is-crypto-2": "Cryptocurrencies, such as bitcoin, enable anyone to transfer money globally. Ethereum does too, but it can also run code that enables people to create apps and organizations. It’s both resilient and flexible: any computer program can run on Ethereum. Learn more and find out how to get started:",
"what-is-ethereum-card-title": "What is Ethereum?",
Expand Down
1 change: 1 addition & 0 deletions src/intl/en/page-run-a-node.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"page-run-a-node-sovereignty-1": "An Ethereum wallet allows you to take full custody and control of your digital assets by holding the private keys to your addresses, but those keys don't tell you the current state of the blockchain, such as your wallet balance.",
"page-run-a-node-sovereignty-2": "By default, Ethereum wallets typically reach out to a 3rd-party node, such as Infura or Alchemy, when looking up your balances. Running your own node allows you to have your own copy of the Ethereum blockchain.",
"page-run-a-node-title": "Run a node",
"page-run-a-node-meta-title": "How to Run an Ethereum Node",
"page-run-a-node-voice-your-choice-title": "Voice your choice",
"page-run-a-node-voice-your-choice-preview": "Don't give up control in the event of a fork.",
"page-run-a-node-voice-your-choice-1": "In the event of a chain fork, where two chains emerge with two different sets of rules, running your own node guarantees your ability to choose which set of rules you support. It's up to you to upgrade to new rules and support proposed changes, or not.",
Expand Down
1 change: 1 addition & 0 deletions src/intl/en/page-stablecoins.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"page-stablecoins-stablecoins-table-type-precious-metals-backed": "Precious metals",
"page-stablecoins-table-error": "Couldn't load stablecoins. Try refreshing the page.",
"page-stablecoins-title": "Stablecoins",
"page-stablecoins-meta-title": "Stablecoins explained: What are they for?",
"page-stablecoins-top-coins": "Top stablecoins by market capitalisation",
"page-stablecoins-top-coins-intro": "Market capitalisation is",
"page-stablecoins-top-coins-intro-code": "the total number of tokens that exist multiplied by the value per token. This list is dynamic and the projects listed here are not necessarily endorsed by the ethereum.org team.",
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-staking.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"page-staking-join-community": "Join the staker community",
"page-staking-join-community-desc": "EthStaker is a community for everyone to discuss and learn about staking on Ethereum. Join tens of thousands of members from around the globe for advice, support, and to talk all things staking.",
"page-staking-meta-description": "An overview of Ethereum staking: the risks, rewards, requirements, and where to do it.",
"page-staking-meta-title": "Ethereum staking",
"page-staking-meta-title": "Ethereum staking: How does it work?",
"page-staking-withdrawals-important-notices": "Important notices",
"page-staking-withdrawals-important-notices-desc": "Withdrawals are not yet available. Please read the <a href=\"https://blog.ethereum.org/2021/12/01/eth2-merge-and-post-merge-faq/\" target=\"_blank\">Eth2 Merge and post-merge FAQ</a> for more information.",
"page-upgrades-merge-btn": "More on The Merge",
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-wallets-find-wallet.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"page-find-wallet-description": "Wallets store and transact your ETH. You can choose from a variety of products that tailor to your needs.",
"page-find-wallet-last-updated": "Last updated",
"page-find-wallet-meta-description": "Find and compare Ethereum wallets based on the features you want.",
"page-find-wallet-meta-title": "Find an Ethereum Wallet",
"page-find-wallet-meta-title": "List of Ethereum Wallets | ethereum.org",
"page-find-wallet-title": "Choose your wallet",
"page-find-wallet-try-removing": "Try removing a feature or two",
"page-stake-eth": "Stake ETH",
Expand Down
2 changes: 1 addition & 1 deletion src/intl/en/page-wallets.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"page-wallets-manage-funds": "An app for managing your funds",
"page-wallets-manage-funds-desc": "Your wallet shows your balances, transaction history and gives you a way to send/receive funds. Some wallets may offer more.",
"page-wallets-meta-description": "What you need to know to use Ethereum wallets.",
"page-wallets-meta-title": "Ethereum wallets",
"page-wallets-meta-title": "Ethereum wallets: Buy, Store and Send crypto",
"page-wallets-mobile": "<b>Mobile applications</b> that make your funds accessible from anywhere",
"page-wallets-more-on-dapps-btn": "More on dapps",
"page-wallets-most-wallets": "Most wallet products will let you generate an Ethereum account. So you don't need one before you download a wallet.",
Expand Down
1 change: 1 addition & 0 deletions src/lib/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface DeveloperDocsLink {
*/
export interface SharedFrontmatter {
title: string
metaTitle?: string
description: string
lang: Lang
sidebarDepth?: number
Expand Down
2 changes: 1 addition & 1 deletion src/pages/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ ContentPage.getLayout = (page) => {
return (
<Layout {...layoutProps}>
<PageMetadata
title={frontmatter.title}
title={frontmatter.metaTitle ?? frontmatter.title}
description={frontmatter.description}
image={frontmatter.image}
author={frontmatter.author}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/layer-2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const Layer2Hub = ({
{/* TODO: Clarify title and description here */}
{/* TODO: Setup for translation */}
<PageMetadata
title={"Ethereum layer 2 networks"}
title={"Intro to Ethereum Layer 2: benefits and uses"}
description={"Learn about Ethereum layer 2 networks"}
image="/images/layer-2/learn-hero.png"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/layer-2/networks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const Layer2Networks = ({ layer2Data, locale, mainnetData }) => {
return (
<MainArticle className="relative flex flex-col">
<PageMetadata
title="Explore networks"
title="Ethereum Layer 2:Explore networks"
description="Using Ethereum today means interacting with hundreds of different networks and apps. All backed by Ethereum as the foundational backbone."
image="/images/layer-2/learn-hero.png"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/learn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const LearnPage = () => {
return (
<div className="relative w-full">
<PageMetadata
title={t("common:learn-hub")}
title={t("page-learn-meta-title")}
description={t("hero-subtitle")}
image="/images/heroes/learn-hub-hero.png"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/run-a-node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ const RunANodePage = () => {
return (
<GappedPage>
<PageMetadata
title={t("page-run-a-node-title")}
title={t("page-run-a-node-meta-title")}
description={t("page-run-a-node-meta-description")}
image="/images/run-a-node/ethereum-inside.png"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/stablecoins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ const StablecoinsPage = ({ markets, marketsHasError }) => {
return (
<Page as={MainArticle}>
<PageMetadata
title={t("page-stablecoins-title")}
title={t("page-stablecoins-meta-title")}
description={t("page-stablecoins-meta-description")}
image="/images/stablecoins/hero.png"
/>
Expand Down

0 comments on commit efb623b

Please sign in to comment.