Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ next-env.d.ts
.cursor
.specstory
.cursorindexingignore

# cloudflare
.open-next/
bundled/
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,23 @@ Welcome to My Blog, a simple blog built with Next.js 13 and Markdown for content

## Project Structure

- `data/`: Contains data-related files.
- `i18n/`: Internationalization and localization files.
- `constants/`: Configuration files for the blog.
- `index.ts`: Giscus comment system config, website metadata, and other constants.
- `content/`: Content data files.
- `i18n/messages/`: Internationalization and localization files (JSON).
- `posts/`: Markdown files for blog posts.
- `giscus.ts`: Configuration for the Giscus comment system.
- `metadata.ts`: Metadata and configuration for the blog.
- `public/static/`: Public static images and other assets.
- `src/`: The main source code directory.
- `src/`: The main source code directory.
- `app/`: Next.js pages and routing.
- `assets/`: Global and component-specific CSS.
- `components/`: Reusable React component.
- `css/`: Global and component-specific CSS.
- `components/`: Reusable React components.
- `hooks/`: Custom React hooks.
- `i18n/`: Internationalization configuration and routing.
- `plugins/`: Additional plugins or extensions.
- `utils/`: Utility functions and helper modules.
- `middleware.ts`: Next.js middleware.
- `tests/`: Test folder contains the application's test files.
- `types/`: TypeScript type definitions.
- `tests/`: Test folder contains the application's test files.
- `types/`: TypeScript type definitions (global types used by both src and tests).

<!-- ## License -->

Expand Down
7 changes: 7 additions & 0 deletions content/i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@
},
"notFound": {
"message": "Sorry we couldn't find this page."
},
"metadata": {
"title": "Mao's Corner",
"description": "Welcome to Mao's Corner, where I document my learning notes.",
"keywords": ["frontend", "notes", "blog", "web development", "programming"],
"applicationName": "Mao's Corner",
"siteName": "Mao's Corner"
}
}
7 changes: 7 additions & 0 deletions content/i18n/messages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@
},
"notFound": {
"message": "抱歉!找不到此頁面。"
},
"metadata": {
"title": "Mao's Corner",
"description": "歡迎來到阿毛的角落,這裡記錄著我學習的筆記。",
"keywords": ["前端", "筆記", "部落格", "網頁開發", "程式設計"],
"applicationName": "Mao's Corner",
"siteName": "Mao's Corner"
}
}
File renamed without changes.
68 changes: 0 additions & 68 deletions data/metadata.ts

This file was deleted.

2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const jestConfig = {
testEnvironment: 'jest-environment-jsdom',
collectCoverageFrom: [
'<rootDir>/src/**/*.{ts,tsx}',
'!<rootDir>/src/proxy.ts',
'!<rootDir>/src/middleware.ts',
'!<rootDir>/src/app/*.tsx',
'!<rootDir>/src/i18n/*.ts',
],
Expand Down
3 changes: 3 additions & 0 deletions open-next.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineCloudflareConfig } from '@opennextjs/cloudflare';

export default defineCloudflareConfig();
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
{
"name": "johnsonmao.github.io",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev --webpack",
"build": "next build --webpack",
"start": "next start",
"lint": "biome lint .",
"lint:fix": "biome lint --write --unsafe .",
"format": "biome format --write .",
"cf:build": "opennextjs-cloudflare build",
"cf:build:dry-run": "npm run cf:build && npm run cf:dry-run",
"cf:dry-run": "wrangler deploy --outdir bundled/ --dry-run",
"cf:preview": "npm run cf:build && opennextjs-cloudflare preview",
"cf:typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts",
"check": "biome check .",
"check:fix": "biome check --write --unsafe .",
"dev": "next dev --webpack",
"format": "biome format --write .",
"lint": "biome lint .",
"lint:fix": "biome lint --write --unsafe .",
"start": "next start",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage"
},
"dependencies": {
"@giscus/react": "^2.4.0",
"@opennextjs/cloudflare": "^1.13.1",
"@react-spring/web": "^9.7.5",
"clsx": "^1.2.1",
"feed": "^4.2.2",
Expand Down Expand Up @@ -56,7 +61,8 @@
"postcss-import": "^15.1.0",
"postcss-load-config": "^4.0.2",
"tailwindcss": "^3.4.18",
"typescript": "^5.9.3"
"typescript": "^5.9.3",
"wrangler": "^4.50.0"
},
"browserslist": [
"defaults and supports es6-module",
Expand Down
Loading