Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 6.41 KB

stack.md

File metadata and controls

38 lines (35 loc) · 6.41 KB

The ethereum.org website stack

Code structure

Folder Primary use
/src Main source folder for development.
/public/assets Image assets.
/src/components React components that do not function as standalone pages.
/public/content Markdown/MDX files for site content stored here.
For example: ethereum.org/en/about/ is built from public/content/about/index.md
The markdown files are parsed by [...slug].tsx and rendered using the proper layout in ContentPage.getLayout method.
/public/content/developers/docs *Markdown files in here use the Docs layout: src/layouts/Docs.tsx
/public/content/developers/tutorials *Markdown files in here use the Tutorial layout: src/layouts/Tutorial.tsx
/src/data General data files importable by components.
/src/hooks Custom React hooks.
/src/intl Language translation JSON files.
/src/pages/api NextJS API Routes (https://nextjs.org/docs/pages/building-your-application/routing/api-routes)
/src/pages React components that function as standalone pages.
/src/scripts
/src/lib/utils
Custom utility scripts.
src/@chakra-ui Stores theme.ts which contains our custom Chakra theme, along with src/@chakra-ui/semanticTokens.ts (dark/light mode tokens) and custom Chakra components styles.
src/layouts NextJS layouts (https://nextjs.org/docs/pages/building-your-application/routing/pages-and-layouts#with-typescript) that define layouts of different regions of the site.