From c5cdcd5bf9af354fac8c8db21c3140b2b9b9e9fe Mon Sep 17 00:00:00 2001 From: wait4xx Date: Mon, 2 Nov 2026 16:57:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(opensource):=20README=20=E5=BC=80=E7=AF=87?= =?UTF-8?q?=E6=8E=A5=E7=BA=BF+=E7=BC=93=E5=AD=98=E5=85=A5=E4=BB=93?= =?UTF-8?q?=EF=BC=88=E6=94=B6=E7=BC=96=E9=81=97=E6=BC=8F=E8=A1=A5=E9=BD=90?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit zh 开源页补收编(此前只提交了 en):githubReadmeMarkdown + renderMarkdown 接线,content/.github-readme.md 缓存入仓(现状 intro_from=off,开启即生效)。 验证: 构建 48 页 exit 0 Spec: none (收编遗漏补齐) Co-authored-by: GLM-5.3 --- content/.github-readme.md | 66 ++++++++++++++++++++++++++++++++++++++ src/pages/opensource.astro | 21 +++++++++--- 2 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 content/.github-readme.md diff --git a/content/.github-readme.md b/content/.github-readme.md new file mode 100644 index 0000000..8394a4e --- /dev/null +++ b/content/.github-readme.md @@ -0,0 +1,66 @@ +
+Typing SVG +
+ + + +
+ +--- + +### 👋 About Me + +- ⛅ An aspiring forecaster rooted in **meteorology**. +- 💻 Passionate about **computer science** and coding. +- 🌐 My web: **[wait4x.online](https://wait4x.online/)** +- ⚡ *"Embrace open source, love open source."* + +--- + +### 📊 GitHub Stats + +
+ stats + top-langs +
+ +
+ +
+ streak +
+ +--- + +### 📈 Activity Graph + +
+ activity-graph +
+ +--- + +### 🐍 Contribution Snake + +
+ snake +
+ +> *This snake is auto-fed every day by a GitHub Action in this repo 🍎* + +--- + +### 📫 Find Me + +
+ + +
+ +--- + +
+ +

+ footer +
diff --git a/src/pages/opensource.astro b/src/pages/opensource.astro index 37be21f..395e1ee 100644 --- a/src/pages/opensource.astro +++ b/src/pages/opensource.astro @@ -3,23 +3,36 @@ import ProjectWall from '../components/geek/ProjectWall.astro'; import Heatmap from '../components/geek/Heatmap.astro'; import BaseLayout from '../layouts/BaseLayout.astro'; import { t } from '../i18n/ui'; -import { openSourceCopy } from '../lib/site-content'; +import { githubReadmeMarkdown, openSourceCopy, openSourceOptions, renderMarkdown } from '../lib/site-content'; -// 叙述文案 + 置顶名单均改由 content/site/opensource.yaml 供给(后台可改) +// 叙述文案 + 置顶名单 + 项目墙选项均改由 content/site/opensource.yaml 供给(后台可改) const copy = await openSourceCopy('zh'); +const options = await openSourceOptions(); +// 开篇来源:github-readme → 构建期取 profile 仓 README(缓存 content/.github-readme.md,失败回落 yaml blurb) +const readmeMd = options.introFrom === 'github-readme' ? await githubReadmeMarkdown() : null; +const readmeHtml = readmeMd ? await renderMarkdown(readmeMd) : null; ---

开源Open Source

-

{copy.blurb}{copy.repoLabel}{copy.blurbAfter}

+ {readmeHtml ? ( +
+ ) : ( +

{copy.blurb}{copy.repoLabel}{copy.blurbAfter}

+ )} - +