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 (
+ <>
+
+ >
+ );
+}
diff --git a/packages/nextjs/app/layout.tsx b/packages/nextjs/app/layout.tsx
index 4b26b27..3281cc4 100644
--- a/packages/nextjs/app/layout.tsx
+++ b/packages/nextjs/app/layout.tsx
@@ -2,6 +2,7 @@ import { Roboto } from "next/font/google";
import localFont from "next/font/local";
import { GoogleAnalytics } from "@next/third-parties/google";
import "@rainbow-me/rainbowkit/styles.css";
+import type { Viewport } from "next";
import { ScaffoldEthAppWithProviders } from "~~/components/ScaffoldEthAppWithProviders";
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";
@@ -15,6 +16,10 @@ export const metadata = {
}),
};
+export const viewport: Viewport = {
+ themeColor: "#0B0B0B",
+};
+
const akiraExpanded = localFont({
src: [{ path: "../public/fonts/AkiraExpanded.otf", weight: "800" }],
variable: "--font-akira",
diff --git a/packages/nextjs/app/sitemap.ts b/packages/nextjs/app/sitemap.ts
new file mode 100644
index 0000000..76302ed
--- /dev/null
+++ b/packages/nextjs/app/sitemap.ts
@@ -0,0 +1,12 @@
+import type { MetadataRoute } from "next";
+
+const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "https://bugchan.xyz";
+
+export default function sitemap(): MetadataRoute.Sitemap {
+ const now = new Date();
+ const routes: MetadataRoute.Sitemap = ["", "/bounties", "/bounties/create", "/leaderboard", "/reports", "/about"].map(
+ path => ({ url: `${siteUrl}${path}`, lastModified: now, changeFrequency: "daily", priority: path ? 0.8 : 1 }),
+ );
+
+ return routes;
+}
diff --git a/packages/nextjs/public/robots.txt b/packages/nextjs/public/robots.txt
index 1faf2f6..0254bee 100644
--- a/packages/nextjs/public/robots.txt
+++ b/packages/nextjs/public/robots.txt
@@ -4,4 +4,4 @@ Disallow: /blockexplorer
Allow: /
Sitemap: https://bugchan.xyz/sitemap.xml
-Host: https://bugchan.xyz
+Host: bugchan.xyz
diff --git a/packages/nextjs/public/sitemap.xml b/packages/nextjs/public/sitemap.xml
deleted file mode 100644
index 2d85caf..0000000
--- a/packages/nextjs/public/sitemap.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- https://bugchan.xyz/
- 1.00
- daily
-
-
- https://bugchan.xyz/bounties
- 0.80
- daily
-
-
- https://bugchan.xyz/reports
- 0.80
- daily
-
-