Giter VIP home page Giter VIP logo

base's Introduction

Seed of THX

欢迎使用 thx/base 创建 THX 风格的文档网站。

所含内容

.
├── Gruntfile.js
├── _config.yml
├── _includes
│   ├── archive.html
│   └── ceiling.html
├── assets
│   ├── base.css
│   ├── img
│   │   └── bg.jpg
│   └── syntax
│       └── github.css
├── package.json
└── readme.md

thx/base 本质上就是个 jekyll 脚手架,我们可以在其基础上快速开发稳当网站。同时,thx/base 还包含 THX 系列站点 风格的样式等资源文件,以及用来与 thx/base 保持同步的 Grunt 任务。

用法

准备

需要安装 jekyll 与 git。 Mac 用户,可以如此安装 jekyll:

sudo gem install github-pages

如果装了 Homebrew,则可以如此安装 git:

brew install git

Windows 用户,推荐安装 msysgit。安装 jekyll 的方法请看 阿狼的文章

简要步骤

  • 获取代码
  • 修改配置
  • 添加内容
git clone [email protected]:thx/base.git

修改 _config.yml ,在 baseurl 一栏填上你的仓库名称:

--- a/_config.yml
+++ b/_config.yml
@@ -1,4 +1,4 @@
-baseurl: /your-project
+baseurl: /brix-core

修改 package.json ,填上 name 一栏:

--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "base",
+  "name": "brix-core",

当然还要修改 git remote:

git remote set-url origin [email protected]:thx/brix-core.git

范例

请参考如下示例:

同步 thx/base

站点开发完毕之后,thx/base 有更新时,我们很可能需要同步过来,可以使用内建的 Grunt 命令:

$ grunt base:pull:github

如果你对 thx/base 的调整感兴趣,也可以在你的文档项目的平级目录放置 thx/base 的代码,例如:

➜  Projects  tree -L 1 thx
thx
├── base
└── thx.github.io

然后在 thx.github.io 中专心开发,觉得都搞定之后,再使用如下命令:

$ grunt base:push

就可以把修改过的 thx/base 相关文件(CSS、_includes 等)推送到 thx/base 目录了。

来源

当前风格模仿自 http://www.awwwards.com/10-html-css-online-code-editors-for-web-developers.html

base's People

Contributors

cyjake avatar

Watchers

 avatar  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.