Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ All notable changes to this project will be documented in this file.

### Changed

- **Page-Specific SEO Descriptions**: Add metadata for CLA, security, community values, and blog tag pages, with bilingual policy-page descriptions
- **Astro 6 → 7 Major Upgrade**: `astro` ^6.4.8 → ^7.1.3, `@astrojs/vercel` ^10.0.8 → ^11.0.3, `@astrojs/mdx` ^6.0.3 → ^7.0.3 (Astro 7 ships with Vite 8 + Rolldown, stricter SSR static-build validation)
- **astro-compress Upgrade**: ^2.3.8 → ^2.4.1 (picks up svgo 4.x, sharp 0.34.x)
- **npm overrides Update**: Added `"svgo": ">=4.0.2"` and `"sharp": "^0.35.3"` overrides to force transitive dependencies to safe versions; removed conflicting `"vite": "^7"` override (Astro 7 requires Vite 8)
Expand Down
4 changes: 4 additions & 0 deletions src/layouts/MarkdownLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ export interface Props {
frontmatter: {
title?: string;
titleEn?: string;
description?: string;
descriptionEn?: string;
};
}

const { frontmatter } = Astro.props;
const description = [frontmatter?.description, frontmatter?.descriptionEn].filter(Boolean).join(' - ');

const metadata: MetaData = {
title: frontmatter?.title,
description: description || undefined,
};
---

Expand Down
1 change: 1 addition & 0 deletions src/pages/[...blog]/[tag]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const lastPage = page.lastPage ?? 1;
const total = page.total ?? page.data.length;

const metadata = {
description: `Posts tagged '${tag.title}' - articles from the iFLYTEK open source blog.`,
title: `标签:${tag.title}${currentPage > 1 ? ` — 第 ${currentPage} 页` : ''}`,
robots: {
index: blogTagRobots?.index,
Expand Down
10 changes: 9 additions & 1 deletion src/pages/cla.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
import MarkdownLayout from '~/layouts/MarkdownLayout.astro';
---

<MarkdownLayout frontmatter={{ title: '贡献者许可协议', titleEn: 'Contributor License Agreement' }}>
<MarkdownLayout
frontmatter={{
title: '贡献者许可协议',
titleEn: 'Contributor License Agreement',
description: '科大讯飞开源社区贡献者许可协议(CLA),涵盖贡献相关的版权与专利许可授予。',
descriptionEn:
'The iFLYTEK Open Source Community Contributor License Agreement covering copyright and patent license grants for contributions.',
}}
>
<!-- Chinese Content -->
<div class="i18n-zh">
<p>
Expand Down
9 changes: 8 additions & 1 deletion src/pages/security.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import MarkdownLayout from '~/layouts/MarkdownLayout.astro';
---

<MarkdownLayout frontmatter={{ title: '安全策略', titleEn: 'Security Policy' }}>
<MarkdownLayout
frontmatter={{
title: '安全策略',
titleEn: 'Security Policy',
description:
'科大讯飞开源安全策略 — How to responsibly report security vulnerabilities in iFLYTEK open source projects and what to expect from the disclosure process.',
}}
>
<!-- Chinese Content -->
<div class="i18n-zh">
<p>如果你在本项目中发现安全问题,请遵循以下指南。</p>
Expand Down
9 changes: 8 additions & 1 deletion src/pages/values.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import MarkdownLayout from '~/layouts/MarkdownLayout.astro';
---

<MarkdownLayout frontmatter={{ title: '社区价值观', titleEn: 'Community Values' }}>
<MarkdownLayout
frontmatter={{
title: '社区价值观',
titleEn: 'Community Values',
description:
'科大讯飞开源社区价值观 — The shared values of the iFLYTEK open source community: openness, inclusion, respect and collaboration.',
}}
>
<!-- Chinese Content -->
<div class="i18n-zh">
<p>科大讯飞开源社区建立在我们共同遵循的价值观之上,这些价值观指引着我们的互动、决策与成长。</p>
Expand Down
Loading