This guide explains how the migrated Hiero website is structured today.
- Next.js
16.1.7 - React
19.2.3 - TypeScript
5 - Tailwind CSS
4 pnpm10
The site uses the Next.js App Router under src/app.
| Path | Purpose |
|---|---|
src/app |
Route files, layouts, metadata, and page entry points. |
src/components |
Shared UI building blocks used across pages, organized as one folder per component with colocated tests. |
src/lib/posts.ts |
Markdown parsing and content-loading helpers for blog posts and simple pages. |
src/data |
Generated or static JSON used by the app. |
src/scripts |
Local scripts such as sync-repo-stats.mjs, which runs before pnpm dev and pnpm build. |
content/posts |
Blog post markdown files and blog landing-page metadata. |
content/hacktoberfest |
Markdown-backed content for the Hacktoberfest page. |
content/heroes |
Markdown-backed content for the Heroes page. |
public |
Static images and other assets served directly by the site. |
docs |
Contributor documentation. |
The current repo uses a few different page patterns.
Most pages are defined directly in src/app. For example:
src/app/page.tsxsrc/app/blog/page.tsxsrc/app/blog/[slug]/page.tsx
Use this approach when a page needs custom layout, composed components, or data that is easier to keep in code.
/hacktoberfest and /heroes are hybrids:
- the route lives in
src/app/<route>/page.tsx - page text comes from
content/<route>/index.md - the route renders shared UI with
SimpleContentPage
Use this pattern when most of the page is editorial content with a small amount of route-specific UI.
Blog posts are loaded from markdown files directly inside content/posts.
The post list and post pages are driven by helpers in src/lib/posts.ts.
The content directory is not fully generic.
content/posts/_index.mdis used for blog landing-page metadata.content/posts/*.mdare blog posts.content/hacktoberfest/index.mdandcontent/heroes/index.mdare still read.content/_index.mdexists, but the homepage is currently hard-coded insrc/app/page.tsxand does not read that file.
When updating documentation, prefer the current runtime behavior over legacy Hugo conventions.
Store images under public/, then reference them with site-rooted paths such
as /images/example.png.
Examples:
/images/Hiero_v4.png/images/authors/jane-doe.png/images/my-post/hero.png
Hiero does not currently support:
- translated content files
- locale routing
- per-language blog variants
Contributors should maintain a single English source of truth unless a dedicated i18n feature is added later.
The current parser only loads top-level markdown files directly inside
content/posts.
Nested directories like content/posts/some-slug/index.md are not currently
used by the runtime blog loader.
Shared UI now uses a folder-per-component structure under src/components.
For example:
src/components/Header/index.tsxsrc/components/Header/__tests__/Header.test.tsx
See 04-components.md for the component layout, import pattern, and testing convention.