GithubHelp home page GithubHelp logo

pombredanne / mirror-web Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tuna/mirror-web

0.0 0.0 0.0 11.4 MB

Source code of the web interface of https://mirrors.tuna.tsinghua.edu.cn/

License: GNU General Public License v2.0

HTML 40.75% JavaScript 21.85% Ruby 0.97% Shell 0.41% Python 5.81% SCSS 28.98% CSS 1.24%

mirror-web's Introduction

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/mongodb/ 中,通过表单选择操作系统和版本号,建议直接使用 Vue.js

mirror-web's People

Contributors

alick avatar bigeagle avatar circuitcoder avatar dotkrnl avatar dramforever avatar fqj1994 avatar gaoyichuan avatar harry-chen avatar heroxbd avatar huandzh avatar huiyiqun avatar jiegec avatar johnnychen94 avatar ksplite avatar lengmoangel avatar makeding avatar maskray avatar scateu avatar septs avatar shankerwangmiao avatar stone-zeng avatar taotieren avatar theinterestingsoul avatar xavieryao avatar xgdgsc avatar xiaq avatar xuehaipan avatar z4yx avatar zenithalhourlyrate avatar zhishengyuan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.