Skip to content

Latest commit

Β 

History

History
executable file
Β·
160 lines (138 loc) Β· 5.13 KB

File metadata and controls

executable file
Β·
160 lines (138 loc) Β· 5.13 KB

Build Status

πŸ’ŽMy personal website and blog >> http://zhewe.me/

Setup

sudo npm install -g gulp bower browser-sync
sudo gem install bundler
bundle install
bower install
npm install

Using Jekyll

jekyll server

Access, localhost:4000

Using Gulp

gulp

or

gulp serve

Create a posts and page using Rake tasks

rake post title="TITLE OF THE POST"
rake page name="about.md"
rake category title="Programing"
rake tag title="Jekyll"

File Structure

.
β”œβ”€β”€ bower.json
β”œβ”€β”€ config.rb
β”œβ”€β”€ _config.yml
β”œβ”€β”€ deploy.sh
β”œβ”€β”€ Gemfile
β”œβ”€β”€ Gemfile.lock
β”œβ”€β”€ gulp
β”‚Β Β  β”œβ”€β”€ config.json
β”‚Β Β  └── tasks
β”œβ”€β”€ gulpfile.js
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
β”œβ”€β”€ Rakefile
β”œβ”€β”€ README.md
β”œβ”€β”€ source
β”‚Β Β  β”œβ”€β”€ 404.html
β”‚Β Β  β”œβ”€β”€ about.html
β”‚Β Β  β”œβ”€β”€ assets
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ css
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ fonts
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ images
β”‚Β Β  β”‚Β Β  └── js
β”‚Β Β  β”œβ”€β”€ _assets
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ fonts
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ images
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ js
β”‚Β Β  β”‚Β Β  └── sass
β”‚Β Β  β”œβ”€β”€ categories
β”‚Β Β  β”œβ”€β”€ CNAME
β”‚Β Β  β”œβ”€β”€ timeline.html
β”‚Β Β  β”œβ”€β”€ _data
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ categories.yml
β”‚Β Β  β”‚Β Β  └── tags.yml
β”‚Β Β  β”œβ”€β”€ feed.xml
β”‚Β Β  β”œβ”€β”€ _includes
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ article.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ footer.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ header.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ head.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ pagination.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post-comments.html
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post-content.html
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post-footer.html
β”‚Β Β  β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post-header.html
β”‚Β Β  β”‚Β Β  β”‚Β Β  └── post-share.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ search-modal.html
β”‚Β Β  β”‚Β Β  └── social.html
β”‚Β Β  β”œβ”€β”€ index.html
β”‚Β Β  β”œβ”€β”€ _layouts
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ category.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ compress.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ default.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ error404.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ home.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ page.html
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post.html
β”‚Β Β  β”‚Β Β  └── tag.html
β”‚Β Β  β”œβ”€β”€ _plugins
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ ext.rb
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ strip.rb
β”‚Β Β  β”‚Β Β  └── youtube.rb
β”‚Β Β  β”œβ”€β”€ _posts
β”‚Β Β  β”œβ”€β”€ blogs
β”‚Β Β  β”‚Β Β  └── index.html
β”‚Β Β  β”œβ”€β”€ robots.txt
β”‚Β Β  β”œβ”€β”€ search.json
β”‚Β Β  β”œβ”€β”€ sitemap.xml
β”‚Β Β  └── tags
└── travisGemfile

All folders starting with underscore, such as _assets will not be included in final site.

  • File bower.json maintains the bower dependencies.
  • Script config.rb sets the paths of assets and other global configurations.
  • YAML file _config.yml stores the global information of admin user.
  • Script deploy.sh is called by .travis.yml and is used to force push the content in source branch to master branch.
  • File Gemfile and Gemfile.lock maintains the ruby dependencies.
  • Folder gulp and script gulpfile.js: see gulp repo
  • File package.json maintains the npm dependencies.
  • Script Rakefile sets several frequently-used functionalities, such as creating new catrgory, creating new tag (mentioned above).
  • Folder source stores all the source code.
  • Folder assets and _assets stores the css, fonts, images and javascripts of the site. And _assets will not be included in the final site.
  • Folder categories stores all kinds of categories. You can add new categories by using rake command.
  • Folder tags stores all kinds of tags. You can add new tags by using rake command.
  • File CNAME stores the domain name.
  • File index.html is the default starting page of the site.
  • File about.html stores self-introduce content.
  • File contract.html is the contract page.
  • Folder blogs stores blog pages.
  • Folder _data stores the information of catrgories and tags in YAML file.
  • Folder _includes and _layouts stores files related to site master template.
  • Folder _plugins stores some customed plugins, such as YouTube video embedded script.
  • Folder _posts stores all post pages. You can add new posts by using rake command.
  • File search.json is used for seach posts.
  • File feed.xml is for RSS subscribe.
  • File robots.txt: Web site owners use the /robots.txt file to give instructions about their site to web robots; this is called The Robots Exclusion Protocol.

Contributing

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

It is free under the open-source MIT license.