Skip to content

Commit e1d7c3f

Browse files
JexsiedanielmarvkantorcodesMostafaElsehyaceppaluni
authored
refactor: Migrate website to Next.js (#277)
Signed-off-by: Daniel Ntege <danientege785@gmail.com> Signed-off-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com> Signed-off-by: Jessie Ssebuliba <jessiessebuliba@gmail.com> Signed-off-by: Mostafa Elsehy <167577346+MostafaElsehy@users.noreply.github.com> Signed-off-by: aceppaluni <aceppaluni@gmail.com> Signed-off-by: Akash bisht <aayush45r@gmail.com> Signed-off-by: freya-docs <freya.docs.pp@gmail.com> Signed-off-by: Rumeysa Coşkun <70705198+coskunrumeysa@users.noreply.github.com> Signed-off-by: PavelSBorisov <pavel.s.borisov@gmail.com> Signed-off-by: Jessica G <jwagantall@linuxfoundation.org> Signed-off-by: Abhijeet Saharan <abhijeetsaharan2236@gmail.com> Signed-off-by: Abhijeet <abhijeetsaharan2236@gmail.com> Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com> Signed-off-by: Jessy <jessiessebuliba@gmail.com> Co-authored-by: Daniel Ntege <danientege785@gmail.com> Co-authored-by: Michael Kantor <6068672+kantorcodes@users.noreply.github.com> Co-authored-by: Mostafa Elsehy <167577346+MostafaElsehy@users.noreply.github.com> Co-authored-by: aceppaluni <113948612+aceppaluni@users.noreply.github.com> Co-authored-by: Akash bisht <aayush45r@gmail.com> Co-authored-by: freya-docs <freya.docs.pp@gmail.com> Co-authored-by: Rumeysa Coşkun <70705198+coskunrumeysa@users.noreply.github.com> Co-authored-by: Pavel Borisov <37436896+PavelSBorisov@users.noreply.github.com> Co-authored-by: Jessica G <jwagantall@linuxfoundation.org> Co-authored-by: Abhijeet <abhijeetsaharan2236@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: exploreriii <133720349+exploreriii@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Andrew Brandt <andrew.brandt@hashgraph.com>
1 parent 7f14ab9 commit e1d7c3f

File tree

185 files changed

+10119
-9506
lines changed

Some content is hidden

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

185 files changed

+10119
-9506
lines changed

.codacy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
exclude_paths:
2+
- "pnpm-lock.yaml"
3+
- "vitest.config.ts"

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
20+
jobs:
21+
build-and-test:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Harden Runner
26+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
27+
with:
28+
egress-policy: audit
29+
30+
- name: Checkout repository
31+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
35+
with:
36+
node-version: 20
37+
38+
- name: Setup pnpm
39+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
40+
with:
41+
version: 10
42+
run_install: false
43+
44+
- name: Get pnpm store directory
45+
id: pnpm-cache
46+
shell: bash
47+
run: |
48+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
49+
50+
- name: Setup pnpm cache
51+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
52+
with:
53+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
54+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
55+
restore-keys: |
56+
${{ runner.os }}-pnpm-store-
57+
58+
- name: Install dependencies
59+
run: pnpm install --frozen-lockfile
60+
61+
- name: Check formatting (Prettier)
62+
run: pnpm format:check
63+
64+
- name: Run lint check
65+
run: pnpm lint
66+
67+
- name: Build Next.js application
68+
run: pnpm build
69+
env:
70+
NEXT_TELEMETRY_DISABLED: 1

.gitignore

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,41 @@
1-
node_modules/
2-
public/
3-
resources/
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
424
.DS_Store
5-
.idea
6-
.env
7-
*.code-workspace
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts

.hugo_build.lock

Whitespace-only changes.

.prettierignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Ignore build artifacts and dependencies
2+
node_modules
3+
.next
4+
out
5+
build
6+
dist
7+
8+
# Ignore lock and environment files
9+
pnpm-lock.yaml
10+
11+
.env
12+
.env.local
13+
14+
# Optional: Ignore specific image file types in the public folder
15+
public/**/*.svg
16+
public/**/*.png
17+
public/**/*.jpg

README.md

Lines changed: 114 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,146 @@
44
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/10697/badge)](https://bestpractices.coreinfrastructure.org/projects/10697)
55
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
66

7-
This repo contains the website of [Hiero](https://hiero.org).
7+
This repo contains the source for [hiero.org](https://hiero.org).
88

9-
## Building the website
10-
See [docs/hugo-setup.md](docs/hugo-setup.md) for installing prerequisites (Hugo, Node.js/npm, Tailwind CSS, PostCSS) and running the site locally.
9+
## Current Stack
1110

11+
- Next.js `16.1.6`
12+
- React `19.2.3`
13+
- TypeScript `5`
14+
- Tailwind CSS `4`
15+
- `pnpm` for dependency management and scripts
1216

13-
## Install packages
14-
```
15-
npm i
17+
The site uses the App Router under `src/app`, renders blog content from `content/posts`, and serves static assets from `public/`.
18+
19+
## Requirements
20+
21+
- Node.js `20` or newer
22+
- `pnpm` `10` or newer
23+
- Git
24+
25+
## Install Dependencies
26+
27+
```bash
28+
pnpm install
1629
```
17-
For Linux Setup Instructions [linux_setup.md](docs/setup/linux_setup.md)
18-
For Windows Setup Instructions [Windows_setup.md](docs/setup/windows_setup.md)
19-
For MacOS Setup Instructions [Macbook_setup.md](docs/setup/Macbook_setup.md)
20-
## Environments
2130

22-
### Dev
23-
For development run the following command in terminal.
31+
Platform-specific setup help:
32+
33+
- Linux: [docs/setup/linux_setup.md](docs/setup/linux_setup.md)
34+
- Windows: [docs/setup/windows_setup.md](docs/setup/windows_setup.md)
35+
- macOS: [docs/setup/Macbook_setup.md](docs/setup/Macbook_setup.md)
36+
37+
## Run Locally
38+
39+
Start the development server:
40+
41+
```bash
42+
pnpm dev
2443
```
25-
npm run start
44+
45+
The site will be available at `http://localhost:3000`.
46+
47+
`pnpm dev` runs `pnpm sync:repo-stats` first, then starts Next.js in development mode.
48+
49+
## Build and Checks
50+
51+
Lint the codebase:
52+
53+
```bash
54+
pnpm lint
2655
```
2756

28-
While the process is running the website can be reached at http://localhost:1313/.
57+
Format source files:
2958

30-
### Production
31-
For production ready css, run the following command in terminal.
59+
```bash
60+
pnpm format
3261
```
33-
npm run build
62+
63+
Check formatting without changing files:
64+
65+
```bash
66+
pnpm format:check
3467
```
3568

36-
## Contributing
69+
Build the production app:
3770

38-
We welcome contributions such as:
39-
- Code additions or changes
40-
- Blog posts
71+
```bash
72+
pnpm build
73+
```
4174

75+
Run the production build locally:
4276

43-
### Code Changes and Additions
44-
We have several [Open Issues](https://github.com/hiero-ledger/hiero-website/issues?q=is%3Aissue%20state%3Aopen%20no%3Aassignee) at the Hiero website that need help.
77+
```bash
78+
pnpm start
79+
```
4580

46-
Read [Workflow Guide](./docs/workflow.md) to get started.
81+
## Project Docs
4782

48-
### Blog Posts
83+
- Local Next.js setup: [docs/nextjs-setup.md](docs/nextjs-setup.md)
84+
- Contributor workflow: [docs/workflow.md](docs/workflow.md)
85+
- Blog writing guide: [docs/blogs.md](docs/blogs.md)
4986

50-
See [Detailed Guide on Creating a Blog Post](./docs/blogs.md)
87+
## Creating a New Blog Post
5188

52-
Quickly create new blog post with basic [front matter](https://gohugo.io/content-management/front-matter/):
89+
Blog posts are loaded from top-level Markdown files in `content/posts`.
5390

54-
hugo new posts/my-first-post.md
91+
1. Create a new file such as `content/posts/my-first-post.md`.
92+
2. Use TOML front matter with `+++` delimiters.
93+
3. Add the required post metadata.
94+
4. Write the body in standard Markdown.
95+
5. Add any images to `public/images/...`.
96+
6. Run `pnpm dev` and preview the post at `/blog/<slug>`.
5597

56-
This will create `content/posts/my-first-post.md` and it will look like this:
57-
```
98+
Use this template:
99+
100+
```toml
58101
+++
59-
title = 'My First Post' #Edit title
60-
date = 2025-04-15T09:40:56-07:00 #Edit date
61-
draft = true #Do not edit
102+
title = "My First Post"
103+
date = 2026-03-15
104+
draft = false
105+
featured_image = "/images/my-first-post/hero.png"
106+
categories = ["Blog"]
107+
tags = ["Example", "Community"]
108+
duration = "4 min read"
109+
abstract = "A short summary used in the blog list and metadata."
110+
slug = "my-first-post"
111+
112+
[[authors]]
113+
name = "Your Name"
114+
title = "Maintainer"
115+
organization = "Hiero"
116+
link = "https://github.com/your-handle"
117+
image = "/images/authors/your-name.png"
62118
+++
63-
## Start Writing here
64-
```
65119

66-
Once written, save and preview, then turn draft to false once finished:
67-
```
68-
hugo server --buildDrafts
120+
Write the rest of the article here in Markdown.
69121
```
70122

71-
Learn about [draft](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content)
123+
Important notes:
124+
125+
- Use `+++`, not YAML `---`.
126+
- The current site only scans `.md` files directly inside `content/posts`.
127+
- If `slug` is omitted, the filename becomes the URL slug.
128+
- If `draft = true`, the post is skipped locally and in production.
129+
- Raw HTML is not rendered in blog content. Use Markdown syntax instead.
130+
- Hugo shortcodes like `{{< ... >}}` and `{{% ... %}}` are stripped out by the current parser.
72131

73-
See an example [Blog Post](https://github.com/hiero-ledger/hiero-website/blob/main/content/posts/python-v0.1.7-release.md)
132+
For the full field reference and workflow, see [docs/blogs.md](docs/blogs.md).
74133

75-
See [Detailed Guide on Creating a Blog Post](./docs/blogs.md)
134+
## Contributing
135+
136+
We welcome contributions such as:
137+
138+
- Code additions or changes
139+
- Blog posts
140+
141+
### Code Changes and Additions
142+
143+
We have several [Open Issues](https://github.com/hiero-ledger/hiero-website/issues?q=is%3Aissue%20state%3Aopen%20no%3Aassignee) at the Hiero website that need help.
144+
145+
Read [Workflow Guide](docs/workflow.md) to get started.
146+
147+
### Blog Posts
76148

149+
See the [Detailed Guide on Creating a Blog Post](docs/blogs.md).

0 commit comments

Comments
 (0)