refactor(content): migrate index page to Nuxt Content

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.
This commit is contained in:
xiaomai
2025-11-05 17:54:59 +08:00
parent 87731a6379
commit 78bc2c34a0
7 changed files with 1353 additions and 1293 deletions

View File

@@ -33,37 +33,7 @@ featuredProjects:
image: "https://img.tootaio.com/i/2025/09/26/j2swgq.png"
techStack:
title: "Tech Stacks"
languageIcons:
- light: "skill-icons:html"
- light: "skill-icons:css"
- light: "skill-icons:javascript"
- light: "skill-icons:typescript"
- light: "skill-icons:docker"
- light: "skill-icons:vuejs-light"
- light: "skill-icons:nuxtjs-light"
- light: "skill-icons:tailwindcss-light"
- light: "skill-icons:nodejs-light"
- light: "skill-icons:cs"
- light: "skill-icons:python-light"
toolsIcons:
- light: "skill-icons:photoshop"
- light: "skill-icons:illustrator"
- light: "skill-icons:git"
- light: "skill-icons:vscode-light"
- light: "skill-icons:visualstudio-light"
- light: "skill-icons:github-light"
- light: "skill-icons:godot-light"
- light: "skill-icons:unity-light"
- light: "skill-icons:blender-light"
- light: "skill-icons:androidstudio-light"
- light: "skill-icons:windows-light"
- light: "skill-icons:linux-light"
- light: "skill-icons:ubuntu-light"
- light: "skill-icons:apple-light"
- light: "skill-icons:idea-light"
- light: "skill-icons:pycharm-light"
- light: "skill-icons:rider-light"
capabilities:
whyChooseUs:
title: "Why Choose Us"
description: "We dont just build code — we craft digital experiences."
features: