Skip to content

Commit 7dae95b

Browse files
committed
Merge branch 'dev' into pr/JoeChenJ/15054
2 parents d12cd32 + 7e19c56 commit 7dae95b

File tree

1,437 files changed

+39323
-14416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,437 files changed

+39323
-14416
lines changed

.all-contributorsrc

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6239,10 +6239,10 @@
62396239
]
62406240
},
62416241
{
6242-
"login": "mradziwon",
6243-
"name": "mradziwon",
6242+
"login": "maciejrrr",
6243+
"name": "maciejrrr",
62446244
"avatar_url": "https://avatars.githubusercontent.com/u/6785984?v=4",
6245-
"profile": "http://www.linkedin.com/in/mradziwon",
6245+
"profile": "http://www.linkedin.com/in/maciejrrr",
62466246
"contributions": [
62476247
"code",
62486248
"bug"
@@ -12715,6 +12715,24 @@
1271512715
"contributions": [
1271612716
"code"
1271712717
]
12718+
},
12719+
{
12720+
"login": "JJOptimist",
12721+
"name": "JJOptimist",
12722+
"avatar_url": "https://avatars.githubusercontent.com/u/86833563?v=4",
12723+
"profile": "https://github.com/JJOptimist",
12724+
"contributions": [
12725+
"bug"
12726+
]
12727+
},
12728+
{
12729+
"login": "microHoffman",
12730+
"name": "microHoffman",
12731+
"avatar_url": "https://avatars.githubusercontent.com/u/61500778?v=4",
12732+
"profile": "http://pwn.xyz",
12733+
"contributions": [
12734+
"bug"
12735+
]
1271812736
}
1271912737
],
1272012738
"contributorsPerLine": 7,

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
# be careful not to expose sensitive data (e.g. your Algolia admin key)
55

66
# Algolia environment (app ID, search key and base search index name required for search)
7+
# You can use the following test keys provided by DocSearch for local development/testing:
8+
# NEXT_PUBLIC_ALGOLIA_APP_ID=R2IYF7ETH7
9+
# NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=599cec31baffa4868cae4e79f180729b
10+
# NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME=docsearch
11+
# Replace insertValue with your actual keys for production builds.
712
# NEXT_PUBLIC_ALGOLIA_APP_ID=insertValue
813
# NEXT_PUBLIC_ALGOLIA_SEARCH_KEY=insertValue
914
# NEXT_PUBLIC_ALGOLIA_BASE_SEARCH_INDEX_NAME=insertValue

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
* @wackerow @corwintines @pettinarip @minimalsm
99

1010
# Owners of specific files
11-
/src/data/consensus-bounty-hunters.json @djrtwo @asanso @fredriksvantes
11+
/src/data/consensus-bounty-hunters.json @asanso @fredriksvantes
1212
/src/data/wallets/new-to-crypto.ts @konopkja @minimalsm
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Suggest a resource
2+
description: Suggest a new resource to list on ethereum.org/resources
3+
title: Suggest a resource
4+
labels: ["resource 📚"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before suggesting a resource, make sure you've read [our listing policy](https://www.ethereum.org/en/contributing/adding-resources/).
10+
- type: markdown
11+
attributes:
12+
value: Only continue with the issue if your resource meets the criteria listed there.
13+
- type: markdown
14+
attributes:
15+
value: If it does, complete the following information which we need to accurately list the resource.
16+
- type: markdown
17+
id: resource_info
18+
attributes:
19+
value: "## Resource info"
20+
- type: input
21+
id: resource_name
22+
attributes:
23+
label: Name
24+
description: Please provide the official name of the resource
25+
validations:
26+
required: true
27+
- type: input
28+
id: resource_url
29+
attributes:
30+
label: Resource URL
31+
description: Please provide a URL to the resource
32+
validations:
33+
required: true
34+
- type: textarea
35+
id: resource_description
36+
attributes:
37+
label: Description
38+
description: Please provide a short 1-2 sentence description of the resource
39+
validations:
40+
required: true
41+
- type: textarea
42+
id: resource_logo
43+
attributes:
44+
label: Logo
45+
description: |
46+
Please provide an SVG or transparent PNG
47+
Tip: You can attach images by clicking this area to highlight it and then dragging files in.
48+
- type: input
49+
id: resource_category
50+
attributes:
51+
label: Category
52+
description: Please specify a best fit to categorize the resource (e.g., DeFi, NFT, Scaling, etc.)
53+
- type: checkboxes
54+
id: resource_work_on
55+
attributes:
56+
label: Would you like to work on this issue?
57+
options:
58+
- label: "Yes"
59+
required: false
60+
- label: "No"
61+
required: false
62+
validations:
63+
required: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ src/data/crowdin/bucketsAwaitingReviewReport.csv
6060
# Storybook
6161
build-storybook.log
6262
storybook-static
63+

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { addons } from "@storybook/manager-api"
22

3-
import favicon from "../public/images/favicon.png"
3+
import favicon from "../public/images/eth-home-icon.png"
44

55
import theme from "./theme"
66

.storybook/preview-head.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

.storybook/preview.tsx

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import isChromatic from "chromatic/isChromatic"
22
import { MotionGlobalConfig } from "framer-motion"
3+
import { IBM_Plex_Mono, Inter } from "next/font/google"
34
import type { Preview } from "@storybook/react"
45

56
import ThemeProvider from "@/components/ThemeProvider"
@@ -9,11 +10,24 @@ import nextIntl, { baseLocales } from "./next-intl"
910
import { withNextThemes } from "./withNextThemes"
1011

1112
import "../src/styles/global.css"
12-
import "../src/styles/fonts.css"
1313
import "../src/styles/docsearch.css"
1414

1515
import "@docsearch/css"
1616

17+
const inter = Inter({
18+
subsets: ["latin"],
19+
display: "swap",
20+
variable: "--font-inter",
21+
preload: true,
22+
})
23+
24+
const ibmPlexMono = IBM_Plex_Mono({
25+
subsets: ["latin"],
26+
weight: ["400"],
27+
display: "swap",
28+
variable: "--font-mono",
29+
})
30+
1731
MotionGlobalConfig.skipAnimations = isChromatic()
1832

1933
export const breakpointSet: [token: string, value: string][] = [
@@ -39,11 +53,13 @@ const preview: Preview = {
3953
defaultTheme: "light",
4054
}),
4155
(Story) => (
42-
<ThemeProvider>
43-
<TooltipProvider>
44-
<Story />
45-
</TooltipProvider>
46-
</ThemeProvider>
56+
<div className={`${inter.variable} ${ibmPlexMono.variable}`}>
57+
<ThemeProvider>
58+
<TooltipProvider>
59+
<Story />
60+
</TooltipProvider>
61+
</ThemeProvider>
62+
</div>
4763
),
4864
],
4965
parameters: {

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ Learn more about how we review pull requests [here](docs/review-process.md).
155155

156156
> An Onchain Achievement Token (OAT) is a special badge on [Galxe](https://app.galxe.com/quest/ethereumorg). It's a proof of your contribution to the ecosystem. [More on OATs](https://medium.com/galxe-news/introducing-galaxy-oat-on-chain-achievement-token-7e89779242b4).
157157
158-
### ethereum.org 2024 Contributor OATs
158+
### ethereum.org 2025 Contributor OATs
159159

160-
- If you have committed any changes in 2024 so far that were merged into our repo or if you have translated a certain amount of words, you can claim your OATs!
160+
- If you have committed any changes in 2025 so far that were merged into our repo or if you have translated a certain amount of words, you can claim your OATs!
161161
- There are OATs for GitHub, content, design and translation contributions.
162162

163163
[![Discord](https://img.shields.io/discord/714888181740339261?color=1C1CE1&label=Claim%20Your%20POAP!%20%7C%20Discord%20%F0%9F%91%8B%20&style=flat)](https://discord.gg/ethereum-org)
@@ -1945,6 +1945,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
19451945
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jenish-thapa"><img src="https://avatars.githubusercontent.com/u/141203631?v=4?s=100" width="100px;" alt="Jenish Thapa"/><br /><sub><b>Jenish Thapa</b></sub></a><br /><a href="#ideas-jenish-thapa" title="Ideas, Planning, & Feedback">🤔</a></td>
19461946
<td align="center" valign="top" width="14.28%"><a href="https://jiangxue.org/~ritsu"><img src="https://avatars.githubusercontent.com/u/57232813?v=4?s=100" width="100px;" alt="iusx"/><br /><sub><b>iusx</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=iusx" title="Code">💻</a></td>
19471947
</tr>
1948+
<tr>
1949+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/JJOptimist"><img src="https://avatars.githubusercontent.com/u/86833563?v=4?s=100" width="100px;" alt="JJOptimist"/><br /><sub><b>JJOptimist</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AJJOptimist" title="Bug reports">🐛</a></td>
1950+
<td align="center" valign="top" width="14.28%"><a href="http://pwn.xyz"><img src="https://avatars.githubusercontent.com/u/61500778?v=4?s=100" width="100px;" alt="microHoffman"/><br /><sub><b>microHoffman</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AmicroHoffman" title="Bug reports">🐛</a></td>
1951+
</tr>
19481952
</tbody>
19491953
</table>
19501954

app/[locale]/[...slug]/page.tsx

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
import pick from "lodash.pick"
2+
import { notFound } from "next/navigation"
3+
import { getMessages, setRequestLocale } from "next-intl/server"
4+
5+
import I18nProvider from "@/components/I18nProvider"
6+
import mdComponents from "@/components/MdComponents"
7+
8+
import { dataLoader } from "@/lib/utils/data/dataLoader"
9+
import { dateToString } from "@/lib/utils/date"
10+
import { getPostSlugs } from "@/lib/utils/md"
11+
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
12+
13+
import { LOCALES_CODES } from "@/lib/constants"
14+
15+
import { componentsMapping, layoutMapping } from "@/layouts"
16+
import { fetchGFIs } from "@/lib/api/fetchGFIs"
17+
import { getPageData } from "@/lib/md/data"
18+
import { getMdMetadata } from "@/lib/md/metadata"
19+
20+
const loadData = dataLoader([["gfissues", fetchGFIs]])
21+
22+
function getLayoutFromSlug(slug: string) {
23+
if (slug.includes("developers/docs")) {
24+
return "docs"
25+
}
26+
27+
if (slug.includes("developers/tutorials")) {
28+
return "tutorial"
29+
}
30+
31+
return "static"
32+
}
33+
34+
export default async function Page({
35+
params,
36+
}: {
37+
params: Promise<{ locale: string; slug: string[] }>
38+
}) {
39+
const { locale, slug: slugArray } = await params
40+
41+
// Check if this specific path is in our valid paths
42+
const validPaths = await generateStaticParams()
43+
const isValidPath = validPaths.some(
44+
(path) =>
45+
path.locale === locale && path.slug.join("/") === slugArray.join("/")
46+
)
47+
48+
if (!isValidPath) {
49+
notFound()
50+
}
51+
52+
// Enable static rendering
53+
setRequestLocale(locale)
54+
55+
const [gfissues] = await loadData()
56+
57+
const slug = slugArray.join("/")
58+
59+
const {
60+
content,
61+
frontmatter,
62+
tocItems,
63+
lastEditLocaleTimestamp,
64+
isTranslated,
65+
contributors,
66+
timeToRead,
67+
} = await getPageData({
68+
locale,
69+
slug,
70+
// TODO: Address component typing error here (flip `FC` types to prop object types)
71+
// @ts-expect-error Incompatible component function signatures
72+
components: { ...mdComponents, ...componentsMapping },
73+
scope: {
74+
gfissues,
75+
},
76+
})
77+
78+
// Determine the actual layout after we have the frontmatter
79+
const layout = frontmatter.template || getLayoutFromSlug(slug)
80+
const Layout = layoutMapping[layout]
81+
82+
// If the page has a published date, format it
83+
if ("published" in frontmatter) {
84+
frontmatter.published = dateToString(frontmatter.published)
85+
}
86+
87+
// Get i18n messages
88+
const allMessages = await getMessages({ locale })
89+
const requiredNamespaces = getRequiredNamespacesForPage(slug, layout)
90+
const messages = pick(allMessages, requiredNamespaces)
91+
92+
return (
93+
<I18nProvider locale={locale} messages={messages}>
94+
<Layout
95+
slug={slug}
96+
frontmatter={frontmatter}
97+
tocItems={tocItems}
98+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
99+
contentNotTranslated={!isTranslated}
100+
contributors={contributors}
101+
timeToRead={Math.round(timeToRead.minutes)}
102+
>
103+
{content}
104+
</Layout>
105+
</I18nProvider>
106+
)
107+
}
108+
109+
export async function generateStaticParams() {
110+
const slugs = await getPostSlugs("/")
111+
112+
return LOCALES_CODES.flatMap((locale) =>
113+
slugs.map((slug) => ({
114+
slug: slug.split("/").slice(1),
115+
locale,
116+
}))
117+
)
118+
}
119+
120+
export const dynamicParams = false
121+
122+
export async function generateMetadata({
123+
params,
124+
}: {
125+
params: Promise<{ locale: string; slug: string[] }>
126+
}) {
127+
const { locale, slug } = await params
128+
129+
return await getMdMetadata({
130+
locale,
131+
slug,
132+
})
133+
}

0 commit comments

Comments
 (0)