Skip to content
Merged
28 changes: 28 additions & 0 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { MetadataRoute } from "next"

import { SITE_URL } from "@/lib/constants"

export default function robots(): MetadataRoute.Robots {
let hostname = ""
try {
hostname = new URL(SITE_URL).hostname
} catch (error) {
console.error("Error getting hostname", error)
}

const isProduction = hostname === "ethereum.org"

if (!isProduction) {
return {
rules: [{ userAgent: "*", disallow: "/" }],
sitemap: [],
host: SITE_URL,
}
}

return {
rules: [{ userAgent: "*", allow: "/" }],
sitemap: [`${SITE_URL}/sitemap.xml`],
host: SITE_URL,
}
}
3 changes: 1 addition & 2 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const defaultLocale = "en"

/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || "https://ethereum.org",
generateRobotsTxt: true,
siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://ethereum.org",
transform: async (_, path) => {
const rootPath = path.split("/")[1]
if (path.endsWith("/404")) return null
Expand Down
6 changes: 6 additions & 0 deletions public/content/ethereum-forks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ Looking for future protocol upgrades? [Learn about upcoming upgrades on the Ethe

## 2025 {#2025}

### Fulu-Osaka ("Fusaka", _in progress_) {#fusaka}

<NetworkUpgradeSummary name="fusaka" />

[More on Fusaka](/roadmap/fusaka/)

### Prague-Electra ("Pectra") {#pectra}

<NetworkUpgradeSummary name="pectra" />
Expand Down
6 changes: 6 additions & 0 deletions src/data/networkUpgradeSummaryData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import type { NetworkUpgradeData } from "@/lib/types"

const networkUpgradeSummaryData: NetworkUpgradeData = {
fusaka: {
dateTimeAsString: "2025-12-03T21:49:11.000Z",
epochNumber: 411392,
slotNumber: 411392 * 32,
isPending: true,
},
pectra: {
dateTimeAsString: "2025-05-07T10:05:11.000Z",
ethPriceInUSD: 2222,
Expand Down
5 changes: 3 additions & 2 deletions src/data/roadmap/releases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import PectraImage from "@/public/images/roadmap/roadmap-pectra.png"
type TranslationFunction = (key: string) => string

type DateString =
`2${number}${number}${number}-${number}${number}-${number}${number}`
| `2${number}${number}${number}-${number}${number}-${number}${number}`
| `${number}${number}${number}${number}-${number}${number}-${number}${number}T${number}${number}:${number}${number}:${number}${number}.${number}${number}${number}Z`
type YearString = `2${number}${number}${number}`

interface BaseRelease {
Expand Down Expand Up @@ -143,7 +144,7 @@ export const getReleasesData = (t: TranslationFunction): Release[] => [
{
image: FusakaImage,
releaseName: "Fusaka",
plannedReleaseYear: "2025",
releaseDate: "2025-12-03T21:49:11.000Z",
content: (
<div>
<p className="font-bold">{t("page-roadmap-fusaka-peerdas-title")}</p>
Expand Down
4 changes: 1 addition & 3 deletions src/lib/ab-testing/server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { SITE_URL } from "@/lib/constants"

import type { ABTestAssignment, ABTestConfig } from "./types"

const getABTestConfigs = async (): Promise<Record<string, ABTestConfig>> => {
try {
const response = await fetch(`${SITE_URL}/api/ab-config`, {
const response = await fetch("https://ethereum.org/api/ab-config", {
next: { revalidate: 3600 },
})

Expand Down
Loading