The Ultimate Developer Guide & Tutorials for Google's Gemma 3n Model
Gemma-3n.net 是 Google Gemma 3n 模型的终极开发者指南和教程网站。我们提供完整的开发资源,包括快速开始指南、性能基准、部署教程和最佳实践。
src/
├── components/ # 可复用组件
│ ├── Header.astro # 导航栏组件
│ ├── Footer.astro # 页脚组件
│ └── ...
├── pages/ # 英文页面
│ ├── index.astro # 首页
│ ├── blog/ # 博客页面
│ ├── toolkit.astro # 工具箱
│ └── ...
├── pages/zh/ # 中文页面
│ ├── index.astro # 中文首页
│ ├── blog/ # 中文博客
│ └── ...
├── i18n/ # 国际化配置
│ ├── locales/
│ │ ├── en/ # 英文翻译
│ │ └── zh/ # 中文翻译
│ └── index.ts # i18n 配置
├── layouts/ # 布局组件
├── content/ # 博客内容
└── styles/ # 全局样式
npm install
npm run dev
npm run build
npm run preview
/)| 页面 | 路径 | 描述 |
|---|---|---|
| 首页 | / | 主页面,包含 Hero Section 和核心功能 |
| 关于 | /about | 项目介绍和团队信息 |
| 博客 | /blog | 教程和文章列表 |
| 工具箱 | /toolkit | 开发资源和工具 |
| 模型选择器 | /model-selector | 智能模型推荐 |
| 演示 | /demo | 在线演示功能 |
| 对比 | /compare/gemma-vs-llama3 | 模型对比分析 |
| 排行榜 | /leaderboard | 性能排行榜 |
/zh/)所有英文页面都有对应的中文版本,路径前缀为 /zh/
/* 主色调 */
--primary: #3B82F6 (blue-600)
--secondary: #8B5CF6 (purple-500)
--accent: #10B981 (emerald-500)
/* 中性色 */
--dark: #1E293B (slate-800)
--light: #F8FAFC (slate-50)
--gray: #64748B (slate-500)
--spacing-xs: 0.5rem (8px)
--spacing-sm: 1rem (16px)
--spacing-md: 1.5rem (24px)
--spacing-lg: 2rem (32px)
--spacing-xl: 3rem (48px)
src/i18n/locales/
├── en/
│ ├── common.ts # 通用翻译
│ ├── nav.ts # 导航翻译
│ ├── home.ts # 首页翻译
│ └── ...
└── zh/
├── common.ts # 中文通用翻译
├── nav.ts # 中文导航翻译
├── home.ts # 中文首页翻译
└── ...
// 格式: 'page.section.subsection.element'
'nav.model-selector': '模型选择器'
'toolkit.quickstart.ollama.title': 'Ollama 设置'
'home.hero.title': 'Master Gemma 3n'
---
import { useTranslations } from '../i18n';
const t = useTranslations(lang);
---
<h1>{t('home.hero.title')}</h1>
Header.astro)model-selector.astro)toolkit.ts)mobile.css)---
// 1. 导入依赖
import Component from './Component.astro';
// 2. 定义 Props 接口
interface Props {
title: string;
description?: string;
}
// 3. 解构 Props
const { title, description = '' } = Astro.props;
---
<!-- 4. 语义化 HTML 结构 -->
<section class="component">
<h2>{title}</h2>
{description && <p>{description}</p>}
</section>
<!-- 5. 组件样式 -->
<style>
.component {
/* 样式定义 */
}
</style>
# 功能开发
git commit -m "feat: 添加模型选择器功能"
# 问题修复
git commit -m "fix: 修复中文页面重复标题问题"
# 文档更新
git commit -m "docs: 更新 README 文档"
# 样式优化
git commit -m "style: 优化移动端响应式布局"
npm run build
npm run dev
npm run type-check
# 生产环境
NODE_ENV=production
SITE_URL=https://gemma-3n.net
# 开发环境
NODE_ENV=development
SITE_URL=http://localhost:4321
npm run builddistnpm run builddistgit checkout -b feature/amazing-featuregit commit -m 'feat: add amazing feature'git push origin feature/amazing-feature本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
Made with ❤️ by the Gemma-3n.net Team
50 commits
Astro
73.6%
TypeScript
22.6%
CSS
1.6%
JavaScript
1.5%
The Ultimate Developer Guide & Tutorials for Google's Gemma 3n Model
Gemma-3n.net 是 Google Gemma 3n 模型的终极开发者指南和教程网站。我们提供完整的开发资源,包括快速开始指南、性能基准、部署教程和最佳实践。
src/
├── components/ # 可复用组件
│ ├── Header.astro # 导航栏组件
│ ├── Footer.astro # 页脚组件
│ └── ...
├── pages/ # 英文页面
│ ├── index.astro # 首页
│ ├── blog/ # 博客页面
│ ├── toolkit.astro # 工具箱
│ └── ...
├── pages/zh/ # 中文页面
│ ├── index.astro # 中文首页
│ ├── blog/ # 中文博客
│ └── ...
├── i18n/ # 国际化配置
│ ├── locales/
│ │ ├── en/ # 英文翻译
│ │ └── zh/ # 中文翻译
│ └── index.ts # i18n 配置
├── layouts/ # 布局组件
├── content/ # 博客内容
└── styles/ # 全局样式
npm install
npm run dev
npm run build
npm run preview
/)| 页面 | 路径 | 描述 |
|---|---|---|
| 首页 | / | 主页面,包含 Hero Section 和核心功能 |
| 关于 | /about | 项目介绍和团队信息 |
| 博客 | /blog | 教程和文章列表 |
| 工具箱 | /toolkit | 开发资源和工具 |
| 模型选择器 | /model-selector | 智能模型推荐 |
| 演示 | /demo | 在线演示功能 |
| 对比 | /compare/gemma-vs-llama3 | 模型对比分析 |
| 排行榜 | /leaderboard | 性能排行榜 |
/zh/)所有英文页面都有对应的中文版本,路径前缀为 /zh/
/* 主色调 */
--primary: #3B82F6 (blue-600)
--secondary: #8B5CF6 (purple-500)
--accent: #10B981 (emerald-500)
/* 中性色 */
--dark: #1E293B (slate-800)
--light: #F8FAFC (slate-50)
--gray: #64748B (slate-500)
--spacing-xs: 0.5rem (8px)
--spacing-sm: 1rem (16px)
--spacing-md: 1.5rem (24px)
--spacing-lg: 2rem (32px)
--spacing-xl: 3rem (48px)
src/i18n/locales/
├── en/
│ ├── common.ts # 通用翻译
│ ├── nav.ts # 导航翻译
│ ├── home.ts # 首页翻译
│ └── ...
└── zh/
├── common.ts # 中文通用翻译
├── nav.ts # 中文导航翻译
├── home.ts # 中文首页翻译
└── ...
// 格式: 'page.section.subsection.element'
'nav.model-selector': '模型选择器'
'toolkit.quickstart.ollama.title': 'Ollama 设置'
'home.hero.title': 'Master Gemma 3n'
---
import { useTranslations } from '../i18n';
const t = useTranslations(lang);
---
<h1>{t('home.hero.title')}</h1>
Header.astro)model-selector.astro)toolkit.ts)mobile.css)---
// 1. 导入依赖
import Component from './Component.astro';
// 2. 定义 Props 接口
interface Props {
title: string;
description?: string;
}
// 3. 解构 Props
const { title, description = '' } = Astro.props;
---
<!-- 4. 语义化 HTML 结构 -->
<section class="component">
<h2>{title}</h2>
{description && <p>{description}</p>}
</section>
<!-- 5. 组件样式 -->
<style>
.component {
/* 样式定义 */
}
</style>
# 功能开发
git commit -m "feat: 添加模型选择器功能"
# 问题修复
git commit -m "fix: 修复中文页面重复标题问题"
# 文档更新
git commit -m "docs: 更新 README 文档"
# 样式优化
git commit -m "style: 优化移动端响应式布局"
npm run build
npm run dev
npm run type-check
# 生产环境
NODE_ENV=production
SITE_URL=https://gemma-3n.net
# 开发环境
NODE_ENV=development
SITE_URL=http://localhost:4321
npm run builddistnpm run builddistgit checkout -b feature/amazing-featuregit commit -m 'feat: add amazing feature'git push origin feature/amazing-feature本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
Made with ❤️ by the Gemma-3n.net Team
50 commits
Astro
73.6%
TypeScript
22.6%
CSS
1.6%
JavaScript
1.5%