Skip to content

pkusc/10th-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

未名超算队十周年纪念网站

PKU Supercomputing Team 10th Anniversary Website

项目简介

北京大学未名超算队十周年纪念网站,展示历届队员(部分)与历届竞赛记录。 Hugo 静态生成,中英双语,深色科技风。

线上:https://hpc.pku.edu.cn/pkusc/

技术栈

技术 用途
Hugo v0.146+ 静态站点生成器
自建主题 pkusc themes/pkusc/,纯 CSS,无 JS 框架依赖
Hugo i18n 中英双语,独立 content/zh-cncontent/en
Hugo Pipes CSS 压缩 + 指纹 hash
Google Fonts Geist(西文)/ Geist Mono(等宽)/ Noto Sans SC(中文)

目录结构

.
├── hugo.toml                  # 站点配置(多语言、菜单、taxonomies)
├── content/
│   ├── zh-cn/                 # 中文内容
│   │   ├── _index.md          # 首页(含 milestones 时间线数据)
│   │   ├── members/           # 成员(按入学年份分目录)
│   │   │   ├── _index.md
│   │   │   ├── advisors/      # 指导教师独立分组
│   │   │   └── 2018/
│   │   │       ├── _index.md  # 年级页(控制排序权重)
│   │   │       └── lizeyu/
│   │   │           ├── index.md
│   │   │           └── avatar.jpg   # 可选
│   │   └── competitions/      # 竞赛记录
│   └── en/                    # 英文内容(镜像结构)
├── i18n/
│   ├── zh-cn.yaml             # 中文 UI 字符串
│   └── en.yaml                # 英文 UI 字符串
└── themes/pkusc/
    ├── assets/css/main.css    # 主样式表
    ├── layouts/               # 模板
    │   ├── baseof.html
    │   ├── home.html
    │   ├── 404.html
    │   ├── members/
    │   ├── competitions/
    │   └── _partials/
    └── static/                # favicon、赞助商 logo、PKU 校徽等

本地开发

brew install hugo               # 需要 v0.146+

hugo server                     # 开发服务器,秒级热更新
# 浏览器:http://localhost:1313/zh-cn/

hugo --minify                   # 生产构建 → public/

baseURL 当前为 https://hpc.pku.edu.cn/pkusc/。本地预览路径会带 /pkusc/ 前缀(hugo server 自动处理)。

部署

服务器侧:

git pull
hugo --minify
# 将 public/ 同步到 web 根目录

如果改了源码但线上未更新,先确认服务器拉到了最新 commit、并跑了 hugo --minifypublic/ 已 gitignore,不入仓。

添加成员

content/zh-cn/members/<入学年份>/<拼音名>/index.md 创建:

---
title: "李泽宇"              # 显示名
date: 2018-09-01             # 入学时间,决定排序
role: "队员"                 # 队长 / 副队长 / 队员 / 指导老师
grade: "2018级"
joined: "大三上"             # 入队时间(可选)
department: "元培学院 数据科学"
current: "香港科技大学(广州)(在读博士)"  # 当前状态/单位(可选,详情页和卡片都会显示)
direction: "MLSys、LLM Infra"               # 研究方向(可选)
status: "alumni"             # current 在读 / alumni 已毕业
links:                       # 全部可选
  homepage: "https://zeyuli.cn"
  github: "https://github.com/xxx"
  email: "xxx@example.com"
message: "可选的一句话寄语"
---

正文为详细介绍(可选)。

可选地把 avatar.jpg 放到同一目录作为头像;缺省时会用 GitHub 头像,再缺省则用首字占位。

英文版镜像放到 content/en/members/<入学年份>/<拼音名>/index.md

新年级要加 _index.md

---
title: "2025级"
weight: 2025
build:
  render: never
  list: local
---

渲染规则:每个年级内按角色排序为 队长 → 副队长 → 其余;指导教师独立在 members/advisors/ 分组。

添加竞赛记录

content/zh-cn/competitions/ 下新建:

---
title: "ASC25 世界大学生超级计算机竞赛"
date: 2025-05-14
competition: "ASC"
year: 2025
result: "亚军"               # 总冠军 / 亚军 / 一等奖 / 第N名 等
location: "中国·青海"
website: "https://www.asc-events.net/StudentChallenge/History/2025/index.html"
news_url: "https://example.com/news"   # 可选
team_members: ["张三", "李四", "王五"]
highlights:
  - "首次完成 XX 算法的 GPU 实现"
  - "整机性能较去年提升 N 倍"
---

可选正文,markdown 任意展开。

编辑首页时间线

content/{zh-cn,en}/_index.mdmilestones 数组:

milestones:
  - year: "2024.04"
    text: "ASC24 总冠军(上海)"
    link: "/competitions/asc-2024/"   # 可选,加上后该条目变超链接

link 字段会被模板拿来在时间线条目上包一层 <a>,路径走 relLangURL,中英文都自动正确。

设计说明

  • 配色:深色 PKU 红 + 中性灰,监视器/终端气质
  • 字体:Geist(西文/数字)+ Noto Sans SC(中文)+ Geist Mono(数据/代码)
  • 响应式:容器最大 1200px,手机折叠菜单

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors