materialize-jekyll

A material design Jekyll theme for blog using MaterializeCSS.


Keywords
jekyll, material, materializecss, theme
License
MIT
Install
gem install materialize-jekyll -v 1.6.0

Documentation

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:

gem "materialize-jekyll"

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

theme: materialize-jekyll

And then execute:

$ bundle

Or install it yourself as:

$ 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:

materialize-jekyll    
│
├─── _includes   
|      ├─── author.html
|      ├─── comments.html
|      ├─── date.html
|      ├─── footer.html
|      ├─── header.html
|      ├─── navbar.html
│      └─── share.html
├─── _layouts
│      ├─── compress.html
│      ├─── default.html
│      ├─── home.html
│      └─── post.html
├─── _posts
│
├─── _sass
│      ├─── _author.scss
│      ├─── _cards.scss
│      ├─── _navbar.scss
│      ├─── _post.scss
│      ├─── _syntax.scss
│      ├─── _tags.scss
│      └─── _variables.html
└─── assets
     │
     └─── css
     │    └─── main.scss
     └─── img
     │    └─── icons
     └─── js
          ├─── init.js
          └─── 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.