diff --git a/README.md b/README.md index d97ed337fe..2a7a6432c1 100644 --- a/README.md +++ b/README.md @@ -22,18 +22,31 @@ And then execute: $ bundle -Then add a `css/main.scss` file based on the following template, don't forget to include the frontmatter: -```css ---- ---- +## Usage -@import "minima"; -``` +### Customization + +To override the default structure and style of minima, simply create the concerned directory at the root of your site, copy the file you wish to customize to that directory, and then edit the file. +e.g., to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path, create an `_includes` directory, copy `_includes/head.html` from minima gem folder to `/_includes` and start editing that file. -You can choose to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path. +The site's default CSS has now moved to a new place within the gem itself, [`assets/main.scss`](assets/main.scss). To **override the default CSS**, the file has to exist at your site source. Do either of the following: +- Create a new instance of `main.scss` at site source. + - Create a new file `main.scss` at `/assets/` + - Add the frontmatter dashes, and + - Add `@import "minima";`, to `/assets/main.scss` + - Add your custom CSS. +- Download the file from this repo + - Create a new file `main.scss` at `/assets/` + - Copy the contents at [assets/main.scss](assets/main.scss) onto the `main.scss` you just created, and edit away! +- Copy directly from Minima 2.0 gem + - Go to your local minima gem installation directory ( run `bundle show minima` to get the path to it ). + - Copy the `assets/` folder from there into the root of `` + - Change whatever values you want, inside `/assets/main.scss` -## Enabling comments (via Disqus) +-- + +### Enabling comments (via Disqus) Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post. @@ -50,7 +63,9 @@ Comments are enabled by default and will only appear in production, i.e., `JEKYL If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter. -## Enabling Google Analytics +-- + +### Enabling Google Analytics To enable Google Anaytics, add the following lines to your Jekyll site: diff --git a/_includes/head.html b/_includes/head.html index 660289c2bb..af34805379 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -8,7 +8,7 @@ {% assign custom_url = site.url | append: site.baseurl %} {% assign full_base_url = custom_url | default: site.github.url %} - + diff --git a/assets/main.scss b/assets/main.scss new file mode 100644 index 0000000000..c91fac8d13 --- /dev/null +++ b/assets/main.scss @@ -0,0 +1,39 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- +@charset "utf-8"; + +// Our variables +$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +$base-font-size: 16px; +$base-font-weight: 400; +$small-font-size: $base-font-size * 0.875; +$base-line-height: 1.5; + +$spacing-unit: 30px; + +$text-color: #111; +$background-color: #fdfdfd; +$brand-color: #2a7ae2; + +$grey-color: #828282; +$grey-color-light: lighten($grey-color, 40%); +$grey-color-dark: darken($grey-color, 25%); + +// Width of the content area +$content-width: 800px; + +$on-palm: 600px; +$on-laptop: 800px; + +// Minima also includes a mixin for defining media queries. +// Use media queries like this: +// @include media-query($on-palm) { +// .wrapper { +// padding-right: $spacing-unit / 2; +// padding-left: $spacing-unit / 2; +// } +// } + +// Import partials from the `minima` theme. +@import "minima"; diff --git a/example/css/main.scss b/example/css/main.scss deleted file mode 100644 index 4085e60a9e..0000000000 --- a/example/css/main.scss +++ /dev/null @@ -1,4 +0,0 @@ ---- ---- - -@import "minima"; diff --git a/minima.gemspec b/minima.gemspec index b696e552a7..b418a1e22d 100644 --- a/minima.gemspec +++ b/minima.gemspec @@ -19,6 +19,22 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } + spec.post_install_message = <<-msg + +---------------------------------------------- +Thank you for installing minima 2.0! + +Minima 2.0 comes with a breaking change that +renders '/css/main.scss' redundant. +That file is now bundled with this gem as +'/assets/main.scss'. + +More Information: +https://github.com/jekyll/minima#customization +---------------------------------------------- + +msg + spec.add_development_dependency "jekyll", "~> 3.2" spec.add_development_dependency "bundler", "~> 1.12" spec.add_development_dependency "rake", "~> 10.0"