jekyll-bootstrap-sass 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +13 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +57 -0
- data/Rakefile +6 -0
- data/jekyll-bootstrap-sass.gemspec +28 -0
- data/lib/bootstrap-sass/bootstrap-sass.rb +8 -0
- data/lib/jekyll-bootstrap-sass.rb +72 -0
- data/lib/jekyll-bootstrap-sass/version.rb +5 -0
- data/script/bootstrap +5 -0
- data/script/cibuild +7 -0
- metadata +142 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4171989d4a750b1f22e5b0fc2544663d24aa0211
|
4
|
+
data.tar.gz: 9047c2eae360e6871a7edcd1fb8932eb100e724b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6e5e9feb73261b5009193c9f5385ce77e76447c090f8ce24b3c7c6609b79c4e0ba52592d0cc0606a8af266c69eee7e8b50490a6c9cc10847baa4101723a5b5bc
|
7
|
+
data.tar.gz: cd9c805bb5032bff34e58b5ca2d1740bb4f8dbed91d6a10823201db2d564a21d08519301af9172d2882636b1cef82ea43fe4e33ad103ed6ce9f1e8166d7921fb
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Ben Balter
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# Jekyll Bootstrap Sass
|
2
|
+
|
3
|
+
*A plugin to add the [Twitter Bootstrap](https://github.com/twbs/bootstrap) framework to your Jekyll site.*
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the following to your site's `Gemfile`:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'jekyll-bootstrap-sass'
|
11
|
+
```
|
12
|
+
|
13
|
+
And add the following to your site's `_config.yml` file:
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
gems:
|
17
|
+
- jekyll-bootstrap-sass
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Create a `.scss` file (e.g., `assets/style.scss`), with the following:
|
23
|
+
|
24
|
+
```scss
|
25
|
+
---
|
26
|
+
---
|
27
|
+
|
28
|
+
@import 'bootstrap';
|
29
|
+
|
30
|
+
// (Your custom CSS Here)
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
When your site is built, Jekyll will automatically add the Bootstrap framework before it renders your site's css. In the above example, the resulting file would be `assets/style.css` with Bootstrap's CSS followed by your own.
|
35
|
+
|
36
|
+
## Assets
|
37
|
+
|
38
|
+
By default, Jekyll Bootstrap SaSS will simply make the `@import 'bootstrap';` directive available to your custom stylesheets so that you can more easily include Bootstrap's CSS.
|
39
|
+
|
40
|
+
If you would like to use Bootstrap's static assets (e.g., fonts, javascripts), you'll need to add the following to your site's `_config.yml`:
|
41
|
+
|
42
|
+
```yml
|
43
|
+
bootstrap:
|
44
|
+
assets: true
|
45
|
+
```
|
46
|
+
|
47
|
+
This will create `/assets/fonts/bootstrap` and `assets/javascripts/bootstrap` folders in the generated site, which you can include in your site's header as you would any other javascript file or font.
|
48
|
+
|
49
|
+
If font's aren't loading properly, you may need to add the following before the `import` directive:
|
50
|
+
|
51
|
+
```scss
|
52
|
+
$icon-font-path: "{{ site.github.url }}/assets/fonts/bootstrap";
|
53
|
+
```
|
54
|
+
|
55
|
+
## Specifying the Bootstrap version
|
56
|
+
|
57
|
+
Jekyll-bootstrap-sass relies on official [`bootstrap-sass` Ruby gem](https://github.com/twbs/bootstrap-sass). To specify the version of Bootstrap used, simply specify the `bootstrap-sass` gem version in your Gemfile.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'jekyll-bootstrap-sass/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'jekyll-bootstrap-sass'
|
8
|
+
spec.version = Jekyll::BootstrapSass::VERSION
|
9
|
+
spec.authors = ['Ben Balter']
|
10
|
+
spec.email = ['ben.balter@github.com']
|
11
|
+
|
12
|
+
spec.summary = 'A plugin to add Twitter Bootstrap to your Jekyll site'
|
13
|
+
spec.homepage = 'https://github.com/benbalter/jekyll-bootstrap-sass'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |file|
|
17
|
+
file.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'jekyll', '>= 2.5'
|
22
|
+
spec.add_dependency 'bootstrap-sass', '~> 3.3'
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
25
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
27
|
+
spec.add_development_dependency 'rubocop'
|
28
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require 'jekyll-bootstrap-sass/version'
|
2
|
+
require 'find'
|
3
|
+
|
4
|
+
# Require bootstrap-sass to add bootstrap to SaSS's load path
|
5
|
+
require 'bootstrap-sass'
|
6
|
+
|
7
|
+
module Jekyll
|
8
|
+
module BootstrapSass
|
9
|
+
class Generator < Jekyll::Generator
|
10
|
+
def generate(site)
|
11
|
+
@site = site
|
12
|
+
|
13
|
+
# Add our static files to Jekyll's native static file support
|
14
|
+
@site.static_files.concat static_files if assets_enabled?
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
# Has the user explictly disabled asset support by adding
|
20
|
+
# The following to their `_config.yml` file:
|
21
|
+
#
|
22
|
+
# bootstrap
|
23
|
+
# assets: false
|
24
|
+
def assets_enabled?
|
25
|
+
return false if @site.config['bootstrap'].nil?
|
26
|
+
@site.config['bootstrap']['assets'] == true
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns an array of Jekyll::StaticFile instances for each file
|
30
|
+
# in asset_files. Files are prefixed with an `assets/` directory
|
31
|
+
def static_files
|
32
|
+
source = File.dirname(assets_path)
|
33
|
+
asset_files.map do |file|
|
34
|
+
dir = File.dirname(file)
|
35
|
+
file_name = File.basename(file)
|
36
|
+
Jekyll::StaticFile.new @site, source, dir, file_name
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Return an array of paths to static files that should be included
|
41
|
+
# in the generated site.
|
42
|
+
#
|
43
|
+
# Note: All paths are relative to the assets_path directory
|
44
|
+
def asset_files
|
45
|
+
asset_files = []
|
46
|
+
Find.find(assets_path).each do |path|
|
47
|
+
next if File.directory?(path)
|
48
|
+
next if path.include?(stylesheets_path) || path.include?(images_path)
|
49
|
+
asset_files << path.sub(assets_path, 'assets')
|
50
|
+
end
|
51
|
+
asset_files
|
52
|
+
end
|
53
|
+
|
54
|
+
# Absolute path to bootstrap-sass's vendored static assets
|
55
|
+
def assets_path
|
56
|
+
@assets_path ||= Bootstrap.assets_path
|
57
|
+
end
|
58
|
+
|
59
|
+
# Absolute path to bootstrap-sass's images directory
|
60
|
+
# Which should be excluded because it's empty
|
61
|
+
def images_path
|
62
|
+
@imags_path ||= File.expand_path 'images/', assets_path
|
63
|
+
end
|
64
|
+
|
65
|
+
# Absolute path to bootstrap-sass's stylesheets directory
|
66
|
+
# Which should be excluded because it's processed by SaSS
|
67
|
+
def stylesheets_path
|
68
|
+
@stylesheets_path ||= File.expand_path 'stylesheets/', assets_path
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/script/cibuild
ADDED
metadata
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-bootstrap-sass
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ben Balter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bootstrap-sass
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.11'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.11'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- ben.balter@github.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".rubocop.yml"
|
107
|
+
- ".travis.yml"
|
108
|
+
- Gemfile
|
109
|
+
- LICENSE.txt
|
110
|
+
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- jekyll-bootstrap-sass.gemspec
|
113
|
+
- lib/bootstrap-sass/bootstrap-sass.rb
|
114
|
+
- lib/jekyll-bootstrap-sass.rb
|
115
|
+
- lib/jekyll-bootstrap-sass/version.rb
|
116
|
+
- script/bootstrap
|
117
|
+
- script/cibuild
|
118
|
+
homepage: https://github.com/benbalter/jekyll-bootstrap-sass
|
119
|
+
licenses:
|
120
|
+
- MIT
|
121
|
+
metadata: {}
|
122
|
+
post_install_message:
|
123
|
+
rdoc_options: []
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
requirements: []
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 2.5.1
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: A plugin to add Twitter Bootstrap to your Jekyll site
|
142
|
+
test_files: []
|