Skip to content

Commit 413256a

Browse files
committed
apply mmistakes
1 parent af845f1 commit 413256a

File tree

712 files changed

+49766
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

712 files changed

+49766
-5
lines changed

CHANGELOG.md

+1,407
Large diffs are not rendered by default.

Gemfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source "https://rubygems.org"
2+
gemspec

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2013-2020 Michael Rose and contributors
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 all
13+
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 THE
21+
SOFTWARE.

README.md

+273-1
Large diffs are not rendered by default.

Rakefile

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
require "bundler/gem_tasks"
2+
require "jekyll"
3+
require "listen"
4+
5+
def listen_ignore_paths(base, options)
6+
[
7+
/_config\.ya?ml/,
8+
/_site/,
9+
/\.jekyll-metadata/
10+
]
11+
end
12+
13+
def listen_handler(base, options)
14+
site = Jekyll::Site.new(options)
15+
Jekyll::Command.process_site(site)
16+
proc do |modified, added, removed|
17+
t = Time.now
18+
c = modified + added + removed
19+
n = c.length
20+
relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s }
21+
print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ")
22+
begin
23+
Jekyll::Command.process_site(site)
24+
puts "regenerated in #{Time.now - t} seconds."
25+
rescue => e
26+
puts "error:"
27+
Jekyll.logger.warn "Error:", e.message
28+
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
29+
end
30+
end
31+
end
32+
33+
task :preview do
34+
base = Pathname.new('.').expand_path
35+
options = {
36+
"source" => base.join('test').to_s,
37+
"destination" => base.join('test/_site').to_s,
38+
"force_polling" => false,
39+
"serving" => true,
40+
"theme" => "minimal-mistakes-jekyll"
41+
}
42+
43+
options = Jekyll.configuration(options)
44+
45+
ENV["LISTEN_GEM_DEBUGGING"] = "1"
46+
listener = Listen.to(
47+
base.join("_data"),
48+
base.join("_includes"),
49+
base.join("_layouts"),
50+
base.join("_sass"),
51+
base.join("assets"),
52+
options["source"],
53+
:ignore => listen_ignore_paths(base, options),
54+
:force_polling => options['force_polling'],
55+
&(listen_handler(base, options))
56+
)
57+
58+
begin
59+
listener.start
60+
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'"
61+
62+
unless options['serving']
63+
trap("INT") do
64+
listener.stop
65+
puts " Halting auto-regeneration."
66+
exit 0
67+
end
68+
69+
loop { sleep 1000 }
70+
end
71+
rescue ThreadError
72+
# You pressed Ctrl-C, oh my!
73+
end
74+
75+
Jekyll::Commands::Serve.process(options)
76+
end

0 commit comments

Comments
 (0)