refactor: 移除项目详情页硬编码的安装指南

移除了对所有带 GitHub 链接项目自动显示的通用安装命令(npm install),
现在安装说明应通过项目的 Markdown 内容字段自定义,更加灵活。
This commit is contained in:
蔡浩涵
2026-01-11 14:57:58 +08:00
parent e63dce2808
commit 14b72dcb7b
-15
View File
@@ -118,21 +118,6 @@ export async function ProjectDetail({ project, locale }: ProjectDetailProps) {
{/* Full content with Markdown rendering */}
{displayContent && <MarkdownContent content={displayContent} />}
{/* Installation section if GitHub link exists */}
{project.links.some((l) => l.type === 'GITHUB') && (
<>
<h3>{t('gettingStarted')}</h3>
<p>{t('installInstructions')}</p>
<pre className="bg-gray-100 dark:bg-gray-800 border border-black dark:border-gray-600 p-4 font-mono text-sm overflow-x-auto">
<code>{`git clone ${
project.links.find((l) => l.type === 'GITHUB')?.url || 'https://github.com/example/project'
}
cd ${project.slug}
npm install`}</code>
</pre>
</>
)}
</article>
{/* Share and Feedback Section - Temporarily disabled for debugging */}