/nshipster.cn

NSHipster 关注被忽略的 Objective-C、Swift 和 Cocoa 特性。每周更新。

Primary LanguageCSSMIT LicenseMIT

NSHipster.cn

NSHipster is a journal of the overlooked bits in Swift, Objective-C and Cocoa. Updated weekly.

This repository hosts the source code that generates and deploys NSHipster.cn. For the articles themselves, see this repository.


Requirements

Running Locally

First, clone the repository by opening Terminal.app and running the following commands:

$ git clone git@github.com:NSHipster/nshipster.cn.git
$ cd nshipster.cn

NSHipster is built using Jekyll, a blog-aware, static site generator in Ruby.

You can run the site locally with the following commands:

$ bundle install
$ bundle exec jekyll serve

Now open the server address in a web browser to see a local copy of the site (by default, Jekyll serves to localhost on port 4000):

$ open http://localhost:4000

Synchronizing Articles

Articles are located in the _posts directory, which is a subtree corresponding to the articles repository.

Git subtrees are similar to submodules, but have a slightly different workflow.

To pull in the latest changes from the articles repository, run the following command:

$ rake articles:pull

If you commit any changes to files in the _posts directory, be sure to push those changes to the articles repository. You can do this by running the following command:

$ rake articles:push

Deploying

NSHipster.cn is hosted by Netlify. The site is configured with continuous deployment such that any push to the master branch on this repository automatically triggers a build and deploys the site, if successful.

Users with Push access can deploy the site by running the following command:

$ git push origin master

You can monitor the status of a deploy in real-time on this dashboard.

Contact

Follow NSHipster on Twitter (@NSHipster)

License

All code is published under the MIT License.

All content is released under the Creative Commons BY-NC License.

NSHipster® and the NSHipster Logo are registered trademarks of NSHipster, LLC.