Skip to content

About

UNIXWIN organization portal — unixwin.dev · Astro static site · three theme candidates · changelogs pulled live from GitHub

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

unixwin.dev — UNIXWIN 官网

UNIXWIN 的官网工程,开源地址: https://github.com/unixwin/unixwin.dev,线上地址 https://unixwin.dev。

纯 Astro 5 静态站:无 UI 框架、无 Tailwind,仅 scoped CSS + 全局 design tokens;day/night 双主题通过 <html data-theme="..."> 切换。

项目简介

展示 UNIXWIN 的 AI-native bash 家族六个产品(niubash / WinuxCmd / rubash / niu-git / wpm / oh-my-niu),聚合各仓库 CHANGELOG。

目录结构

unixwin.dev/
├── astro.config.mjs          # site=https://unixwin.dev + sitemap 集成
├── package.json              # scripts: dev / build / preview / fetch:github
├── scripts/
│   ├── fetch-changelogs.mjs  # 拉取解析各仓库 CHANGELOG.md
│   └── fetch-repo-meta.mjs   # 拉取 GitHub stars 与最新 release tag
├── public/                   # robots.txt / og-image.png / favicon.svg
├── .github/workflows/build.yml
└── src/
    ├── styles/tokens.css     # day/night 双主题 tokens(唯一颜色来源)
    ├── styles/global.css     # 全局基础样式(只用 tokens)
    ├── components/           # BaseLayout / SiteHeader / SiteFooter /
    │                         # CopyButton / InstallTabs / StatsBand /
    │                         # ProductCard / Section / Badge
    ├── data/                 # products / facts / nav / changelogs / repo-meta
    └── pages/
        ├── index.astro               # 首页(day/night)
        ├── 404.astro
        ├── llms.txt.ts               # 构建期生成 /llms.txt
        └── changelog/index.astro     # 聚合更新日志

组件 props、数据 schema、tokens 对照表与代码风格约束见 PORTAL-CONVENTIONS.md(后续定制主题的同事必读)。

数据拉取(npm run fetch:github)

npm run fetch:github
# = node scripts/fetch-changelogs.mjs && node scripts/fetch-repo-meta.mjs
  • fetch-changelogs.mjs:按 niubash / WinuxCmd / rubash / niu-git / oh-my-niu 依次尝试 raw.githubusercontent.com(master → main)→ gh.caomengxuan666.com 镜像 → 本地 ~/unixwin-repos/<repo>/CHANGELOG.md,解析 Keep a Changelog 格式,每仓保留最近 10 版,写 src/data/changelogs.json。单仓失败仅告警跳过。
  • fetch-repo-meta.mjs:GitHub API 取六仓库 stars 与最新 release tag; 未认证 403 时回退到旧缓存 + changelogs.json 首版本,写 src/data/repo-meta.json。 可选环境变量 GITHUB_TOKEN 提高限额。
  • npm run build 不会自动执行拉取(CI 与本地均手动跑),生成的 JSON 会 提交进仓库,因此 CI 只需 npm ci && npm run build。

本地开发与构建

npm install          # 依赖安装(国内网络可加 --registry=https://registry.npmmirror.com)
npm run fetch:github # 可选:刷新 changelogs.json / repo-meta.json
npm run dev          # http://localhost:4321
npm run build        # 产物输出 dist/
npm run preview      # 本地预览 dist/

部署

npm run build
sudo bash /home/cmx/deploy-unixwin.sh        # 服务器上的部署脚本
# 或直接 rsync:
rsync -av --delete dist/ <user>@<host>:/var/www/unixwin.dev/

主题(历史记述)

早期曾有 A·终端 terminal / B·亮色 clean / C·霓虹 neon 三套候选主题 (A 长期服务首页,B/C 曾在 /theme/clean/、/theme/neon/ 回看)。 2026-10-22 治理:三套历史候选连同候选页、ThemeSwitcher 组件与旧 tokens 一并删除,历史候选已删除;现全站仅 day(亮色专业,默认)/ night(暗色) 两主题,顶栏日/月按钮切换,localStorage.unixwin-theme 记忆。

推送到 github.com/unixwin/unixwin.dev

git remote add origin https://github.com/unixwin/unixwin.dev.git
git push -u origin main        # 若远端默认分支是 master,则 git push -u origin master

push 后 GitHub Actions(.github/workflows/build.yml)会自动执行 npm ci && npm run build 校验。

License

MIT — 见 LICENSE。

About

UNIXWIN organization portal — unixwin.dev · Astro static site · three theme candidates · changelogs pulled live from GitHub

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages