Source code of the web interface of https://mirrors.tuna.tsinghua.edu.cn/
Go to file
Harry Chen 22ebcf7216
Sign to deploy
Signed-off-by: Harry Chen <i@harrychen.xyz>
2020-04-01 01:19:54 +08:00
_data add the Blender 2020-03-26 21:19:46 +08:00
_includes Add support for legacy operating systems 2020-03-31 17:38:18 +08:00
_layouts add card to help items 2020-03-31 22:40:22 +08:00
_plugins reorganized config files and finishing the njs-based legacy index page rendering 2019-08-20 23:55:34 -04:00
_posts Update wording in fool news 2020-03-31 21:46:03 +08:00
fancy-index Add more monospace fonts to fancy index 2020-03-03 00:43:09 +08:00
geninfo strict version rule 2020-03-26 21:31:54 +08:00
static Partial fix for taskbar 2020-04-01 00:58:24 +08:00
.editorconfig Create .editorconfig 2015-12-11 16:08:49 +08:00
.gitignore Add desc for artixlinux-iso 2020-03-03 14:46:40 +08:00
404.html Make 404 page configurable 2020-03-23 22:34:37 +08:00
Dockerfile.build upgrade ruby 2020-03-06 22:45:38 +08:00
Dockerfile.dev Use TUNA Mirrors in Dockerfile.dev 2020-03-22 22:01:24 +08:00
Gemfile new mirrors 2016-08-18 14:22:30 +08:00
LICENSE Create LICENSE 2019-01-16 16:50:40 +08:00
README.md add help for nodejs-release 2018-05-21 07:04:37 +08:00
_config.yml add homelink: 2020-03-25 13:10:52 +08:00
gen_desc.py put mirror descriptions to data file, and automatically generate description list 2016-12-12 00:55:13 +08:00
gen_robot.sh Use variable HOST in gen_robot.sh 2020-03-22 22:47:00 +08:00
help.html fix warnings when rendering 2019-07-26 23:21:37 -04:00
index.html [WIP] create legacy index page template 2019-08-20 15:43:01 -04:00
legacy_index.html [WIP] create legacy index page template 2019-08-20 15:43:01 -04:00
news.html Adjusted news page 2020-03-31 22:28:01 +08:00
robots.txt add news for dark mode 2020-03-03 16:06:14 +08:00
status.html Fix status margin top 2020-03-31 21:43:01 +08:00

TUNA mirrors 主页

运行 Demo

直接编译

本站使用 Jekyll 编写,并使用 babel 编译 ECMAScript6因此必须安装 ruby >= 2.0 和 nodejs.

For Centos

1.安装 nodejs

yum install nodejs

2.安装 ruby 2.2.4 and rubygems

Step 1: Install Required Packages

yum install gcc-c++ patch readline readline-devel zlib zlib-devel
yum install libyaml-devel libffi-devel openssl-devel make
yum install bzip2 autoconf automake libtool bison iconv-devel sqlite-devel

Step 2: Compile ruby 2.2.4 source code

wget -c https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.gz

Step 3: Install rubygems

wget -c https://rubygems.org/rubygems/rubygems-2.4.8.tgz
ruby setup.rb
  1. 安装 bundle 和 build
gem install bundle
gem install build
  1. Fork mirrors source code
bundle install
jekyll build

Build In Docker

cd mirror-web
docker build -t builden -f Dockerfile.build .
docker run -it -v /path/to/mirror-web/:/data builden

为正常运行,一些动态数据文件需要下载

wget https://mirrors.tuna.tsinghua.edu.cn/static/tunasync.json -O static/tunasync.json
wget https://mirrors.tuna.tsinghua.edu.cn/static/tunet.json -O static/tunet.json
mkdir -p static/status
wget https://mirrors.tuna.tsinghua.edu.cn/static/status/isoinfo.json -O static/status/isoinfo.json

之后 jekyll serve 即可运行 demo.

贡献文档

基本步骤

  1. Fork 本项目并 clone
  2. 创建分支 git checkout -b foo-doc
  3. _posts/help 中建立文档文件,文件名格式为 年-月-日-名称.md
  4. 用 markdown 语法编写文档
  5. 提交并推送代码
  6. 发送 Pull Request

写作规范

  1. 对于相对不知名的镜像项目,首先用一两句话介绍该项目
  2. 写明使用方法, 使用 Github Flavored Markdown 格式
  3. 中英文字符间应留一个空格

特殊用法

表单选择

例如 http://mirrors.tuna.tsinghua.edu.cn/help/tensorflow/ 中,通过表单选择操作系统和版本号,建议直接使用 Vue.js