diff --git a/packages/nextjs/app/blockexplorer/address/[address]/page.tsx b/packages/nextjs/app/blockexplorer/address/[address]/page.tsx index ca4566b..bd22a4e 100644 --- a/packages/nextjs/app/blockexplorer/address/[address]/page.tsx +++ b/packages/nextjs/app/blockexplorer/address/[address]/page.tsx @@ -1,4 +1,5 @@ import fs from "fs"; +import type { Metadata } from "next"; import path from "path"; import { Address } from "viem"; import { hardhat } from "viem/chains"; @@ -7,6 +8,12 @@ import deployedContracts from "~~/contracts/deployedContracts"; import { isZeroAddress } from "~~/utils/scaffold-eth/common"; import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract"; +export const metadata: Metadata = { + robots: { index: false, follow: false }, + title: "Block Explorer — Address", + description: "Local-only block explorer address details", +}; + type PageProps = { params: Promise<{ address: Address }>; }; diff --git a/packages/nextjs/app/blockexplorer/layout.tsx b/packages/nextjs/app/blockexplorer/layout.tsx index c526f28..e622cd9 100644 --- a/packages/nextjs/app/blockexplorer/layout.tsx +++ b/packages/nextjs/app/blockexplorer/layout.tsx @@ -1,9 +1,13 @@ +import type { Metadata } from "next"; import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; -export const metadata = getMetadata({ - title: "BugChan", - description: "Block Explorer created with 🏗 Scaffold-ETH 2", -}); +export const metadata: Metadata = { + ...getMetadata({ + title: "Block Explorer", + description: "Local-only block explorer utilities", + }), + robots: { index: false, follow: false }, +}; const BlockExplorerLayout = ({ children }: { children: React.ReactNode }) => { return <>{children}; diff --git a/packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx b/packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx index 8e2c2eb..313b2cf 100644 --- a/packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx +++ b/packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx @@ -1,8 +1,14 @@ import TransactionComp from "../_components/TransactionComp"; -import type { NextPage } from "next"; +import type { Metadata, NextPage } from "next"; import { Hash } from "viem"; import { isZeroAddress } from "~~/utils/scaffold-eth/common"; +export const metadata: Metadata = { + robots: { index: false, follow: false }, + title: "Block Explorer — Transaction", + description: "Local-only block explorer transaction details", +}; + type PageProps = { params: Promise<{ txHash?: Hash }>; }; diff --git a/packages/nextjs/app/debug/page.tsx b/packages/nextjs/app/debug/page.tsx index e6fb89f..c39ccc7 100644 --- a/packages/nextjs/app/debug/page.tsx +++ b/packages/nextjs/app/debug/page.tsx @@ -1,11 +1,14 @@ import { DebugContracts } from "./_components/DebugContracts"; -import type { NextPage } from "next"; +import type { Metadata, NextPage } from "next"; import { getMetadata } from "~~/utils/scaffold-eth/getMetadata"; -export const metadata = getMetadata({ - title: "Debug Contracts", - description: "Debug your deployed 🏗 Scaffold-ETH 2 contracts in an easy way", -}); +export const metadata: Metadata = { + ...getMetadata({ + title: "Debug Contracts", + description: "Debug your deployed 🏗 Scaffold-ETH 2 contracts in an easy way", + }), + robots: { index: false, follow: false }, +}; const Debug: NextPage = () => { return ( diff --git a/packages/nextjs/app/head.tsx b/packages/nextjs/app/head.tsx new file mode 100644 index 0000000..754c696 --- /dev/null +++ b/packages/nextjs/app/head.tsx @@ -0,0 +1,17 @@ +export default function Head() { + const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://bugchan.xyz"; + const orgJsonLd = { + "@context": "https://schema.org", + "@type": "Organization", + name: "BugChan", + url: siteUrl, + logo: `${siteUrl}/logo.svg`, + sameAs: ["https://x.com", "https://github.com", "https://linkedin.com"], + }; + + return ( + <> +