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}

+ )} - +