项目作者: victorpre

项目描述 :
A material design Jekyll theme for blog using MaterializeCSS
高级语言: HTML
项目地址: git://github.com/victorpre/materialize-jekyll.git
创建时间: 2017-08-23T05:09:55Z
项目社区:https://github.com/victorpre/materialize-jekyll

开源协议:MIT License

下载


materialize-jekyll

Materialize meets Jekyll

Welcome to your materialize-jekyll theme! This is where Materialize meets Jekyll.

Demo available: here

Installation

Add this line to your Jekyll site’s Gemfile:

  1. gem "materialize-jekyll"

And add this line to your Jekyll site’s _config.yml:

  1. theme: materialize-jekyll

And then execute:

  1. $ bundle

Or install it yourself as:

  1. $ gem install materialize-jekyll

Note: if you are hosting your site with GitHub Pages you will have to clone this project and copy the theme files manually to your directory.

Since November 2017 you can use this theme by adding: remote_theme: victorpre/materialize-jekyll on your _config.yml file.

Usage

Project tree:

  1. materialize-jekyll
  2. ├─── _includes
  3. | ├─── author.html
  4. | ├─── comments.html
  5. | ├─── date.html
  6. | ├─── footer.html
  7. | ├─── header.html
  8. | ├─── navbar.html
  9. └─── share.html
  10. ├─── _layouts
  11. ├─── compress.html
  12. ├─── default.html
  13. ├─── home.html
  14. └─── post.html
  15. ├─── _posts
  16. ├─── _sass
  17. ├─── _author.scss
  18. ├─── _cards.scss
  19. ├─── _navbar.scss
  20. ├─── _post.scss
  21. ├─── _syntax.scss
  22. ├─── _tags.scss
  23. └─── _variables.html
  24. └─── assets
  25. └─── css
  26. └─── main.scss
  27. └─── img
  28. └─── icons
  29. └─── js
  30. ├─── init.js
  31. └─── vendor

This gem offers some main layouts that can be used/edited:

  • The _layouts/default.html, is the skeleton of the pages, where header,footer, assets are called. It should be used in most of the other layouts,
  • The _layouts/home.html is the main layout the will be your home, where your blog posts will be shown;
  • The _layouts/post.html is the layout used to present the blog posts themselves, where they will be rendered.

Inside the _includes/ directory there are the partials that are used inside the layouts.

The stylesheets of this gem can be edited both in _sass/ and in assets/css/main.scss.
The main colors of the theme can be found and customized in _sass/variables.scss.

To edit the current JavaScript functions of the gem, the file you are looking for is in assets/js/init.js.

Your blog posts (*.md files) should be put in the _posts directory.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/victorpre/materialize-jekyll. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Development

To set up your environment to develop this theme, run bundle install.

Your theme is setup just like a normal Jekyll site! To test your theme, run bundle exec jekyll serve and open your browser at http://localhost:4000. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme’s contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in _layouts, _includes, and _sass tracked with Git will be released.

Credits

This theme was inspired by the Google’s Material Design, using the components from Materialize framework and it has a lot of influence from Willian Justen’s Card Jekyll Template.

License

The theme is available as open source under the terms of the MIT License.