78bc2c34a02cf04e29844232b11692669523c84b
This commit refactors the index page to source its content from @nuxt/content, replacing the previous implementation that used i18n JSON files and hardcoded data within the component. Key changes: - Introduced `content.config.ts` to define collections and Zod schemas for type-safe content. - Moved page content into localized YAML files (`content/en-US/index.yml` and `content/zh-CN/index.yml`). - Updated `app/pages/index.vue` to fetch data dynamically using `useAsyncData` and `queryCollection`. - Removed redundant content from i18n JSON files and the Vue component script. This change decouples content from presentation, improves maintainability, and centralizes content management.
Nuxt Minimal Starter
Look at the Nuxt documentation to learn more.
Setup
Make sure to install dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
Development Server
Start the development server on http://localhost:3000:
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
Production
Build the application for production:
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
Locally preview production build:
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
Check out the deployment documentation for more information.
Description
Languages
TypeScript
49.6%
Vue
47.1%
CSS
2.9%
JavaScript
0.4%