Source code of liveneeq's techblog.
It's powered by Jekyll.
Requirement:
- Ruby 2.2+
- Bundler: 1.10+
git clone https://github.com/onecampus/blog cd blog # install dependencies bundle install # use jekyll built-in server jekyll serve # build. You can then use any server to serve static files in _site directory jekyll build # build in production mode JEKYLL_ENV=production jekyll build # validate generated html files bundle exec htmlproof ./_site --empty-alt-ignore --disable-external
For more usage of jekyll, refer to Jekyll Documentation.
- Fork the repository, and create a personal branch based on upstream/master (upstream here means liveneeq's official repository) to work on
- Add your author info to
_data/authors.yml - Add a post file to
_posts, names it like "2015-12-08-welcome-to-jekyll.md" - Commit and push to your repository
- Create a pull request to upstream/master
- (Optional) Delete the personal branch after your pull request is accepted
Note:
- Only fast-forward mergable pull requests should be accepted, so rebase may be needed
- Squashing your commits before creating a pull request is strongly encouraged
- Every pull request will be automatically tested by Travis-CI. Of course failed pull requests won't be accepted
Whenever upstream/master is updated, the blog will be automatically deployed, and you can see your post in the blog site.
See the former section if you want to test or preview your post locally.
Author info is saved in _data/authors.yml.
You must specify avatar, job, intro fields.
Optionally, you can specify your github, twitter, facebook, lofter, zhihu accounts.
If you don't have any of these accounts, delete that field instead of leave it empty
Add author: name(name is the key in _data/authors.yml) to the beginning of the post file to declare its author.
For security and availability reasons, it is recommended to save your avatar in assets/avatars instead of using foreign resource.
Disqus comment is integrated.
If you want to disable comments, add disable_comments: true to the beginning of the post file.
Comments is only activated in production mode.
Add tags: [tag1, tag2] to the beginning of the post file.
You can have as many tags as you want.
Add category: tech to the beginning of the post file.
Any post should belong to one of the following categories: tech, design, product.
Write your post content with Github Flavored Markdown.
If you need to use images or other assets, save then in assets/. Create sub-directory if necessary.