guard-jekyll-plus 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +71 -0
- data/LICENSE.txt +22 -0
- data/README.md +126 -0
- data/Rakefile +1 -0
- data/guard-jekyll-plus.gemspec +20 -0
- data/lib/guard/jekyll/templates/Guardfile +5 -0
- data/lib/guard/jekyll/version.rb +5 -0
- data/lib/guard/jekyll.rb +160 -0
- data/test/.gitignore +1 -0
- data/test/Gemfile +3 -0
- data/test/Gemfile.lock +71 -0
- data/test/Guardfile +8 -0
- data/test/_config.yml +2 -0
- data/test/_layouts/default.html +46 -0
- data/test/_layouts/post.html +9 -0
- data/test/_posts/2013-07-08-welcome-to-jekyll.markdown +24 -0
- data/test/css/main.css +165 -0
- data/test/css/syntax.css +60 -0
- data/test/index.html +13 -0
- metadata +99 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
guard-jekyll-plus (1.0.0)
|
5
|
+
guard (>= 1.1.0)
|
6
|
+
jekyll (>= 1.0.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
classifier (1.3.3)
|
12
|
+
fast-stemmer (>= 1.0.0)
|
13
|
+
coderay (1.0.9)
|
14
|
+
colorator (0.1)
|
15
|
+
commander (4.1.3)
|
16
|
+
highline (~> 1.6.11)
|
17
|
+
directory_watcher (1.4.1)
|
18
|
+
fast-stemmer (1.0.2)
|
19
|
+
ffi (1.9.0)
|
20
|
+
formatador (0.2.4)
|
21
|
+
guard (1.8.1)
|
22
|
+
formatador (>= 0.2.4)
|
23
|
+
listen (>= 1.0.0)
|
24
|
+
lumberjack (>= 1.0.2)
|
25
|
+
pry (>= 0.9.10)
|
26
|
+
thor (>= 0.14.6)
|
27
|
+
highline (1.6.19)
|
28
|
+
jekyll (1.0.3)
|
29
|
+
classifier (~> 1.3)
|
30
|
+
colorator (~> 0.1)
|
31
|
+
commander (~> 4.1.3)
|
32
|
+
directory_watcher (~> 1.4.1)
|
33
|
+
kramdown (~> 1.0.2)
|
34
|
+
liquid (~> 2.3)
|
35
|
+
maruku (~> 0.5)
|
36
|
+
pygments.rb (~> 0.5.0)
|
37
|
+
safe_yaml (~> 0.7.0)
|
38
|
+
kramdown (1.0.2)
|
39
|
+
liquid (2.5.0)
|
40
|
+
listen (1.2.2)
|
41
|
+
rb-fsevent (>= 0.9.3)
|
42
|
+
rb-inotify (>= 0.9)
|
43
|
+
rb-kqueue (>= 0.2)
|
44
|
+
lumberjack (1.0.4)
|
45
|
+
maruku (0.6.1)
|
46
|
+
syntax (>= 1.0.0)
|
47
|
+
method_source (0.8.1)
|
48
|
+
posix-spawn (0.3.6)
|
49
|
+
pry (0.9.12.2)
|
50
|
+
coderay (~> 1.0.5)
|
51
|
+
method_source (~> 0.8)
|
52
|
+
slop (~> 3.4)
|
53
|
+
pygments.rb (0.5.1)
|
54
|
+
posix-spawn (~> 0.3.6)
|
55
|
+
yajl-ruby (~> 1.1.0)
|
56
|
+
rb-fsevent (0.9.3)
|
57
|
+
rb-inotify (0.9.0)
|
58
|
+
ffi (>= 0.5.0)
|
59
|
+
rb-kqueue (0.2.0)
|
60
|
+
ffi (>= 0.5.0)
|
61
|
+
safe_yaml (0.7.1)
|
62
|
+
slop (3.4.5)
|
63
|
+
syntax (1.0.0)
|
64
|
+
thor (0.18.1)
|
65
|
+
yajl-ruby (1.1.0)
|
66
|
+
|
67
|
+
PLATFORMS
|
68
|
+
ruby
|
69
|
+
|
70
|
+
DEPENDENCIES
|
71
|
+
guard-jekyll-plus!
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Brandon Mathis
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
# Guard Jekyll Plus
|
2
|
+
|
3
|
+
A Guard plugin for smarter Jekyll watching.
|
4
|
+
|
5
|
+
Features:
|
6
|
+
|
7
|
+
- Changes to static files apply without triggering an unnecessary build.
|
8
|
+
- Only template file changes trigger a Jekyll build.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
If using Bundler, add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
gem 'guard-jekyll-plus'
|
15
|
+
|
16
|
+
And then run:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it manually with:
|
21
|
+
|
22
|
+
$ gem install guard-jekyll-plus
|
23
|
+
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
Navigate to your Jekyll project directory and create a Guardfile using:
|
28
|
+
|
29
|
+
$ guard init jekyll
|
30
|
+
|
31
|
+
Or if you already have a Guardfile, add a Jekyll guard.
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
guard :jekyll do
|
35
|
+
watch /.*/
|
36
|
+
ignore /^_site/
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
Run the guard and Jekyll will begin watching your project.
|
41
|
+
|
42
|
+
$ guard
|
43
|
+
|
44
|
+
If your Jekyll project has a non-standard directory stucture like this:
|
45
|
+
|
46
|
+
```
|
47
|
+
- source/
|
48
|
+
- public/
|
49
|
+
_config.yml
|
50
|
+
```
|
51
|
+
|
52
|
+
You would do this instead:
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
guard :jekyll do
|
56
|
+
watch /^source/
|
57
|
+
watch /_config.yml/
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
For the most part that's all you'll ever need to do. There are some things you can configure though.
|
62
|
+
|
63
|
+
## Configuration
|
64
|
+
|
65
|
+
This guard has two configurations.
|
66
|
+
|
67
|
+
| Config | Description | Default
|
68
|
+
|:-------------|:-------------------------------------------------|:-------------------------------------------------------|
|
69
|
+
| `extensions` | Array of file extensions to trigger Jekyll build | ['md','markdown','textile','html','haml','slim','xml'] |
|
70
|
+
| `config` | Array of configuration files | ['_config.yml'] |
|
71
|
+
|
72
|
+
**Note:** customizations to the `extensions` configuration are additive.
|
73
|
+
|
74
|
+
### Configuring Jekyll watched file extensions
|
75
|
+
|
76
|
+
Here's how you would add `txt` to the list of file extensions which triggers a Jekyll build.
|
77
|
+
|
78
|
+
```ruby
|
79
|
+
guard :jekyll, :extensions => ['txt'] do
|
80
|
+
watch /.*/
|
81
|
+
ignore /^_site/
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
Now Guard will be watching for changes to txt, md, markdown, textile, html, haml, slim, xml files. When these files change Guard will trigger a Jekyll build. Files
|
86
|
+
which don't match these extensions will be simply copied over to the destination directory when a change occurs, or deleted if appropriate.
|
87
|
+
|
88
|
+
### Configuring Jekyll config file
|
89
|
+
|
90
|
+
Here's how you might tell Jekyll to read from multiple configuration files.
|
91
|
+
|
92
|
+
```ruby
|
93
|
+
guard :jekyll, :config => ['settings.yml', 'override.yml'] do
|
94
|
+
watch /.*/
|
95
|
+
ignore /^_site/
|
96
|
+
end
|
97
|
+
```
|
98
|
+
|
99
|
+
## Contributing
|
100
|
+
|
101
|
+
If you find this to be busticated, let me know in the issues.
|
102
|
+
|
103
|
+
## License
|
104
|
+
|
105
|
+
Copyright (c) 2013 Brandon Mathis
|
106
|
+
|
107
|
+
MIT License
|
108
|
+
|
109
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
110
|
+
a copy of this software and associated documentation files (the
|
111
|
+
"Software"), to deal in the Software without restriction, including
|
112
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
113
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
114
|
+
permit persons to whom the Software is furnished to do so, subject to
|
115
|
+
the following conditions:
|
116
|
+
|
117
|
+
The above copyright notice and this permission notice shall be
|
118
|
+
included in all copies or substantial portions of the Software.
|
119
|
+
|
120
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
121
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
122
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
123
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
124
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
125
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
126
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'guard/jekyll/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = "guard-jekyll-plus"
|
8
|
+
gem.version = Guard::JekyllVersion::VERSION
|
9
|
+
gem.authors = ["Brandon Mathis"]
|
10
|
+
gem.email = ["brandon@imathis.com"]
|
11
|
+
gem.description = %q{A Guard plugin for smarter Jekyll watching}
|
12
|
+
gem.summary = %q{A Guard plugin for Jekyll which intelligently handles changes to static and template files, only running a Jekyll build when necessary. }
|
13
|
+
gem.homepage = "http://github.com/imathis/guard-jekyll-plus"
|
14
|
+
|
15
|
+
gem.add_dependency 'guard', '>= 1.1.0'
|
16
|
+
gem.add_dependency 'jekyll', '>= 1.0.0'
|
17
|
+
|
18
|
+
gem.files = `git ls-files`.split($/)
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
end
|
data/lib/guard/jekyll.rb
ADDED
@@ -0,0 +1,160 @@
|
|
1
|
+
require 'guard'
|
2
|
+
require 'guard/guard'
|
3
|
+
|
4
|
+
require 'jekyll'
|
5
|
+
|
6
|
+
module Guard
|
7
|
+
class Jekyll < Guard
|
8
|
+
|
9
|
+
def initialize (watchers=[], options={})
|
10
|
+
super
|
11
|
+
|
12
|
+
default_extensions = ['md','markdown','textile','html','haml','slim','xml','yml']
|
13
|
+
|
14
|
+
@options = {
|
15
|
+
:extensions => [],
|
16
|
+
:config => ['_config.yml']
|
17
|
+
}.merge(options)
|
18
|
+
|
19
|
+
config = jekyll_config(@options)
|
20
|
+
@site = ::Jekyll::Site.new config
|
21
|
+
@source = local_path config['source']
|
22
|
+
@destination = local_path config['destination']
|
23
|
+
|
24
|
+
extensions = @options[:extensions].concat(default_extensions).flatten.uniq
|
25
|
+
# Convert array of extensions into a regex for matching file extensions eg, /\.md$|\.markdown$|\.html$/i
|
26
|
+
@extensions = Regexp.new extensions.map { |e| (e << '$').gsub('\.', '\\.') }.join('|'), true
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
# Calls #run_all if the :all_on_start option is present.
|
31
|
+
def start
|
32
|
+
UI.info 'Guard::Jekyll is watching for file changes'
|
33
|
+
build
|
34
|
+
end
|
35
|
+
|
36
|
+
def reload
|
37
|
+
build
|
38
|
+
end
|
39
|
+
|
40
|
+
def run_all
|
41
|
+
build
|
42
|
+
end
|
43
|
+
|
44
|
+
def run_on_modifications(paths)
|
45
|
+
changes(paths)
|
46
|
+
end
|
47
|
+
|
48
|
+
def run_on_additions(paths)
|
49
|
+
changes(paths)
|
50
|
+
end
|
51
|
+
|
52
|
+
def run_on_removals(paths)
|
53
|
+
paths.each { |file| remove file }
|
54
|
+
end
|
55
|
+
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def build
|
60
|
+
begin
|
61
|
+
UI.info "Guard::Jekyll "+" building".yellow + " source: #{@source}, destination: #{@destination}"
|
62
|
+
@site.process
|
63
|
+
UI.info "Guard::Jekyll "+" complete".green + " #{@source} built to #{@destination}"
|
64
|
+
|
65
|
+
rescue Exception => e
|
66
|
+
UI.error "Guard::Jekyll build has failed"
|
67
|
+
throw :task_has_failed
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Copy static files to destination directory
|
72
|
+
#
|
73
|
+
def copy(file)
|
74
|
+
begin
|
75
|
+
path = destination_path file
|
76
|
+
FileUtils.mkdir_p File.dirname(path)
|
77
|
+
FileUtils.cp file, path
|
78
|
+
UI.info "Guard::Jekyll" + " copied ".green + "#{file} -> #{path}"
|
79
|
+
rescue Exception => e
|
80
|
+
UI.error "Guard::Jekyll copy has failed"
|
81
|
+
UI.error e
|
82
|
+
throw :task_has_failed
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# Remove deleted source file/directories from destination
|
87
|
+
#
|
88
|
+
def remove(file)
|
89
|
+
path = destination_path file
|
90
|
+
if File.exist? path
|
91
|
+
begin
|
92
|
+
|
93
|
+
FileUtils.rm path
|
94
|
+
UI.info "Guard::Jekyll" + " removed ".red + path
|
95
|
+
|
96
|
+
dir = File.dirname path
|
97
|
+
if Dir[dir+'/*'].empty?
|
98
|
+
FileUtils.rm_r(dir)
|
99
|
+
UI.info "Guard::Jekyll" + " removed ".red + dir
|
100
|
+
end
|
101
|
+
|
102
|
+
rescue Exception => e
|
103
|
+
UI.error "Guard::Jekyll remove has failed"
|
104
|
+
UI.error e
|
105
|
+
throw :task_has_failed
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
true
|
110
|
+
end
|
111
|
+
|
112
|
+
def changes(paths)
|
113
|
+
matches = []
|
114
|
+
copy_files = []
|
115
|
+
|
116
|
+
paths.each do |file|
|
117
|
+
if file =~ @extensions
|
118
|
+
matches.push file
|
119
|
+
else
|
120
|
+
copy_files.push file
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
# If changes match Jekyll extensions, trigger a build else, copy files manually
|
125
|
+
#
|
126
|
+
if matches.length > 0
|
127
|
+
build
|
128
|
+
else
|
129
|
+
copy_files.each { |f| copy f }
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
def jekyll_config(options)
|
134
|
+
config_files = options[:config]
|
135
|
+
config_files = [config_files] unless config_files.is_a? Array
|
136
|
+
::Jekyll.configuration({ "config" => config_files })
|
137
|
+
end
|
138
|
+
|
139
|
+
def local_path(path)
|
140
|
+
Dir.chdir('.')
|
141
|
+
current = Dir.pwd
|
142
|
+
path = path.sub current, ''
|
143
|
+
if path == ''
|
144
|
+
'./'
|
145
|
+
else
|
146
|
+
path.sub /^\//, ''
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def destination_path(file)
|
151
|
+
if @source =~ /^\./
|
152
|
+
File.join @destination, file
|
153
|
+
else
|
154
|
+
file.sub /^#{@source}/, "#{@destination}"
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
data/test/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
_site
|
data/test/Gemfile
ADDED
data/test/Gemfile.lock
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
guard-jekyll-plus (1.0.0)
|
5
|
+
guard (>= 1.1.0)
|
6
|
+
jekyll (>= 1.0.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
classifier (1.3.3)
|
12
|
+
fast-stemmer (>= 1.0.0)
|
13
|
+
coderay (1.0.9)
|
14
|
+
colorator (0.1)
|
15
|
+
commander (4.1.3)
|
16
|
+
highline (~> 1.6.11)
|
17
|
+
directory_watcher (1.4.1)
|
18
|
+
fast-stemmer (1.0.2)
|
19
|
+
ffi (1.9.0)
|
20
|
+
formatador (0.2.4)
|
21
|
+
guard (1.8.1)
|
22
|
+
formatador (>= 0.2.4)
|
23
|
+
listen (>= 1.0.0)
|
24
|
+
lumberjack (>= 1.0.2)
|
25
|
+
pry (>= 0.9.10)
|
26
|
+
thor (>= 0.14.6)
|
27
|
+
highline (1.6.19)
|
28
|
+
jekyll (1.0.3)
|
29
|
+
classifier (~> 1.3)
|
30
|
+
colorator (~> 0.1)
|
31
|
+
commander (~> 4.1.3)
|
32
|
+
directory_watcher (~> 1.4.1)
|
33
|
+
kramdown (~> 1.0.2)
|
34
|
+
liquid (~> 2.3)
|
35
|
+
maruku (~> 0.5)
|
36
|
+
pygments.rb (~> 0.5.0)
|
37
|
+
safe_yaml (~> 0.7.0)
|
38
|
+
kramdown (1.0.2)
|
39
|
+
liquid (2.5.0)
|
40
|
+
listen (1.2.2)
|
41
|
+
rb-fsevent (>= 0.9.3)
|
42
|
+
rb-inotify (>= 0.9)
|
43
|
+
rb-kqueue (>= 0.2)
|
44
|
+
lumberjack (1.0.4)
|
45
|
+
maruku (0.6.1)
|
46
|
+
syntax (>= 1.0.0)
|
47
|
+
method_source (0.8.1)
|
48
|
+
posix-spawn (0.3.6)
|
49
|
+
pry (0.9.12.2)
|
50
|
+
coderay (~> 1.0.5)
|
51
|
+
method_source (~> 0.8)
|
52
|
+
slop (~> 3.4)
|
53
|
+
pygments.rb (0.5.1)
|
54
|
+
posix-spawn (~> 0.3.6)
|
55
|
+
yajl-ruby (~> 1.1.0)
|
56
|
+
rb-fsevent (0.9.3)
|
57
|
+
rb-inotify (0.9.0)
|
58
|
+
ffi (>= 0.5.0)
|
59
|
+
rb-kqueue (0.2.0)
|
60
|
+
ffi (>= 0.5.0)
|
61
|
+
safe_yaml (0.7.1)
|
62
|
+
slop (3.4.5)
|
63
|
+
syntax (1.0.0)
|
64
|
+
thor (0.18.1)
|
65
|
+
yajl-ruby (1.1.0)
|
66
|
+
|
67
|
+
PLATFORMS
|
68
|
+
ruby
|
69
|
+
|
70
|
+
DEPENDENCIES
|
71
|
+
guard-jekyll-plus!
|
data/test/Guardfile
ADDED
data/test/_config.yml
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title>{{ page.title }}</title>
|
7
|
+
<meta name="viewport" content="width=device-width">
|
8
|
+
|
9
|
+
<!-- syntax highlighting CSS -->
|
10
|
+
<link rel="stylesheet" href="/css/syntax.css">
|
11
|
+
|
12
|
+
<!-- Custom CSS -->
|
13
|
+
<link rel="stylesheet" href="/css/main.css">
|
14
|
+
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<div class="container">
|
19
|
+
<div class="site">
|
20
|
+
<div class="header">
|
21
|
+
<h1 class="title"><a href="/">{{ site.name }}</a></h1>
|
22
|
+
<a class="extra" href="/">home</a>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
{{ content }}
|
26
|
+
|
27
|
+
<div class="footer">
|
28
|
+
<div class="contact">
|
29
|
+
<p>
|
30
|
+
Your Name<br />
|
31
|
+
What You Are<br />
|
32
|
+
your@email.com
|
33
|
+
</p>
|
34
|
+
</div>
|
35
|
+
<div class="contact">
|
36
|
+
<p>
|
37
|
+
<a href="http://github.com/yourusername/">github.com/yourusername</a><br />
|
38
|
+
<a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
|
39
|
+
</p>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
</div> <!-- /container -->
|
44
|
+
|
45
|
+
</body>
|
46
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
layout: post
|
3
|
+
title: "Welcome to Jekyll!"
|
4
|
+
date: 2013-07-08 16:37:07
|
5
|
+
categories: jekyll update
|
6
|
+
---
|
7
|
+
|
8
|
+
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
|
9
|
+
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
|
10
|
+
|
11
|
+
Jekyll also offers powerful support for code snippets:
|
12
|
+
|
13
|
+
{% highlight ruby %}
|
14
|
+
def print_hi(name)
|
15
|
+
puts "Hi, #{name}"
|
16
|
+
end
|
17
|
+
print_hi('Tom')
|
18
|
+
#=> prints 'Hi, Tom' to STDOUT.
|
19
|
+
{% endhighlight %}
|
20
|
+
|
21
|
+
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
|
22
|
+
|
23
|
+
[jekyll-gh]: https://github.com/mojombo/jekyll
|
24
|
+
[jekyll]: http://jekyllrb.com
|
data/test/css/main.css
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
/*****************************************************************************/
|
2
|
+
/*
|
3
|
+
/* Common
|
4
|
+
/*
|
5
|
+
/*****************************************************************************/
|
6
|
+
|
7
|
+
/* Global Reset */
|
8
|
+
* {
|
9
|
+
margin: 0;
|
10
|
+
padding: 0;
|
11
|
+
}
|
12
|
+
|
13
|
+
html, body { height: 100%; }
|
14
|
+
|
15
|
+
body {
|
16
|
+
background-color: #FFF;
|
17
|
+
font: 13.34px Helvetica, Arial, sans-serif;
|
18
|
+
font-size: small;
|
19
|
+
text-align: center;
|
20
|
+
}
|
21
|
+
|
22
|
+
h1, h2, h3, h4, h5, h6 {
|
23
|
+
font-size: 100%; }
|
24
|
+
|
25
|
+
h1 { margin-bottom: 1em; }
|
26
|
+
p { margin: 1em 0; }
|
27
|
+
|
28
|
+
a { color: #00a; }
|
29
|
+
a:hover { color: #000; }
|
30
|
+
a:visited { color: #a0a; }
|
31
|
+
|
32
|
+
table {
|
33
|
+
font-size: inherit;
|
34
|
+
font: 100%;
|
35
|
+
}
|
36
|
+
|
37
|
+
/*****************************************************************************/
|
38
|
+
/*
|
39
|
+
/* Home
|
40
|
+
/*
|
41
|
+
/*****************************************************************************/
|
42
|
+
ul.posts {
|
43
|
+
list-style-type: none;
|
44
|
+
margin-bottom: 2em;
|
45
|
+
}
|
46
|
+
|
47
|
+
ul.posts li {
|
48
|
+
line-height: 1.75em;
|
49
|
+
}
|
50
|
+
|
51
|
+
ul.posts span {
|
52
|
+
color: #aaa;
|
53
|
+
font-family: Monaco, "Courier New", monospace;
|
54
|
+
font-size: 80%;
|
55
|
+
}
|
56
|
+
|
57
|
+
/*****************************************************************************/
|
58
|
+
/*
|
59
|
+
/* Site
|
60
|
+
/*
|
61
|
+
/*****************************************************************************/
|
62
|
+
|
63
|
+
.site {
|
64
|
+
font-size: 115%;
|
65
|
+
text-align: justify;
|
66
|
+
width: 42em;
|
67
|
+
margin: 3em auto 2em;
|
68
|
+
line-height: 1.5em;
|
69
|
+
}
|
70
|
+
|
71
|
+
.site .header a {
|
72
|
+
font-weight: bold;
|
73
|
+
text-decoration: none;
|
74
|
+
}
|
75
|
+
|
76
|
+
.site .header h1.title {
|
77
|
+
display: inline-block;
|
78
|
+
margin-bottom: 2em;
|
79
|
+
}
|
80
|
+
|
81
|
+
.site .header h1.title a {
|
82
|
+
color: #a00;
|
83
|
+
}
|
84
|
+
|
85
|
+
.site .header h1.title a:hover {
|
86
|
+
color: #000;
|
87
|
+
}
|
88
|
+
|
89
|
+
.site .header a.extra {
|
90
|
+
color: #aaa;
|
91
|
+
margin-left: 1em;
|
92
|
+
}
|
93
|
+
|
94
|
+
.site .header a.extra:hover {
|
95
|
+
color: #000;
|
96
|
+
}
|
97
|
+
|
98
|
+
.site .meta {
|
99
|
+
color: #aaa;
|
100
|
+
}
|
101
|
+
|
102
|
+
.site .footer {
|
103
|
+
font-size: 80%;
|
104
|
+
color: #666;
|
105
|
+
border-top: 4px solid #eee;
|
106
|
+
margin-top: 2em;
|
107
|
+
overflow: hidden;
|
108
|
+
}
|
109
|
+
|
110
|
+
.site .footer .contact {
|
111
|
+
float: left;
|
112
|
+
margin-right: 3em;
|
113
|
+
}
|
114
|
+
|
115
|
+
.site .footer .contact a {
|
116
|
+
color: #8085C1;
|
117
|
+
}
|
118
|
+
|
119
|
+
.site .footer .rss {
|
120
|
+
margin-top: 1.1em;
|
121
|
+
margin-right: -.2em;
|
122
|
+
float: right;
|
123
|
+
}
|
124
|
+
|
125
|
+
.site .footer .rss img {
|
126
|
+
border: 0;
|
127
|
+
}
|
128
|
+
|
129
|
+
/*****************************************************************************/
|
130
|
+
/*
|
131
|
+
/* Posts
|
132
|
+
/*
|
133
|
+
/*****************************************************************************/
|
134
|
+
|
135
|
+
/* standard */
|
136
|
+
.post pre {
|
137
|
+
border: 1px solid #ddd;
|
138
|
+
background-color: #eef;
|
139
|
+
padding: 0 .4em;
|
140
|
+
}
|
141
|
+
|
142
|
+
.post ul, .post ol {
|
143
|
+
margin-left: 1.35em;
|
144
|
+
}
|
145
|
+
|
146
|
+
.post code {
|
147
|
+
border: 1px solid #ddd;
|
148
|
+
background-color: #eef;
|
149
|
+
padding: 0 .2em;
|
150
|
+
}
|
151
|
+
|
152
|
+
.post pre code {
|
153
|
+
border: none;
|
154
|
+
}
|
155
|
+
|
156
|
+
/* terminal */
|
157
|
+
.post pre.terminal {
|
158
|
+
border: 1px solid #000;
|
159
|
+
background-color: #333;
|
160
|
+
color: #FFF;
|
161
|
+
}
|
162
|
+
|
163
|
+
.post pre.terminal code {
|
164
|
+
background-color: #333;
|
165
|
+
}
|
data/test/css/syntax.css
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
.highlight { background: #ffffff; }
|
2
|
+
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
3
|
+
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
4
|
+
.highlight .k { font-weight: bold } /* Keyword */
|
5
|
+
.highlight .o { font-weight: bold } /* Operator */
|
6
|
+
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
7
|
+
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
8
|
+
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
9
|
+
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
10
|
+
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
11
|
+
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
12
|
+
.highlight .ge { font-style: italic } /* Generic.Emph */
|
13
|
+
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
14
|
+
.highlight .gh { color: #999999 } /* Generic.Heading */
|
15
|
+
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
16
|
+
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
17
|
+
.highlight .go { color: #888888 } /* Generic.Output */
|
18
|
+
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
19
|
+
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
20
|
+
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
21
|
+
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
22
|
+
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
23
|
+
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
24
|
+
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
25
|
+
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
26
|
+
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
27
|
+
.highlight .m { color: #009999 } /* Literal.Number */
|
28
|
+
.highlight .s { color: #d14 } /* Literal.String */
|
29
|
+
.highlight .na { color: #008080 } /* Name.Attribute */
|
30
|
+
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
31
|
+
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
32
|
+
.highlight .no { color: #008080 } /* Name.Constant */
|
33
|
+
.highlight .ni { color: #800080 } /* Name.Entity */
|
34
|
+
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
35
|
+
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
36
|
+
.highlight .nn { color: #555555 } /* Name.Namespace */
|
37
|
+
.highlight .nt { color: #000080 } /* Name.Tag */
|
38
|
+
.highlight .nv { color: #008080 } /* Name.Variable */
|
39
|
+
.highlight .ow { font-weight: bold } /* Operator.Word */
|
40
|
+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
41
|
+
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
42
|
+
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
43
|
+
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
44
|
+
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
45
|
+
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
46
|
+
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
47
|
+
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
48
|
+
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
49
|
+
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
50
|
+
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
51
|
+
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
52
|
+
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
53
|
+
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
54
|
+
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
55
|
+
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
56
|
+
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
57
|
+
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
58
|
+
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
59
|
+
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
60
|
+
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
data/test/index.html
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
title: Your New Jekyll Site
|
4
|
+
---
|
5
|
+
|
6
|
+
<div id="home">
|
7
|
+
<h1>Blog Posts</h1>
|
8
|
+
<ul class="posts">
|
9
|
+
{% for post in site.posts %}
|
10
|
+
<li><span>{{ post.date | date_to_string }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li>
|
11
|
+
{% endfor %}
|
12
|
+
</ul>
|
13
|
+
</div>
|
metadata
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: guard-jekyll-plus
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Brandon Mathis
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: guard
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.1.0
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: jekyll
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: 1.0.0
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 1.0.0
|
46
|
+
description: A Guard plugin for smarter Jekyll watching
|
47
|
+
email:
|
48
|
+
- brandon@imathis.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- Gemfile.lock
|
56
|
+
- LICENSE.txt
|
57
|
+
- README.md
|
58
|
+
- Rakefile
|
59
|
+
- guard-jekyll-plus.gemspec
|
60
|
+
- lib/guard/jekyll.rb
|
61
|
+
- lib/guard/jekyll/templates/Guardfile
|
62
|
+
- lib/guard/jekyll/version.rb
|
63
|
+
- test/.gitignore
|
64
|
+
- test/Gemfile
|
65
|
+
- test/Gemfile.lock
|
66
|
+
- test/Guardfile
|
67
|
+
- test/_config.yml
|
68
|
+
- test/_layouts/default.html
|
69
|
+
- test/_layouts/post.html
|
70
|
+
- test/_posts/2013-07-08-welcome-to-jekyll.markdown
|
71
|
+
- test/css/main.css
|
72
|
+
- test/css/syntax.css
|
73
|
+
- test/index.html
|
74
|
+
homepage: http://github.com/imathis/guard-jekyll-plus
|
75
|
+
licenses: []
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
requirements: []
|
93
|
+
rubyforge_project:
|
94
|
+
rubygems_version: 1.8.23
|
95
|
+
signing_key:
|
96
|
+
specification_version: 3
|
97
|
+
summary: A Guard plugin for Jekyll which intelligently handles changes to static and
|
98
|
+
template files, only running a Jekyll build when necessary.
|
99
|
+
test_files: []
|