Skip to content

Commit

Permalink
set Theme
Browse files Browse the repository at this point in the history
  • Loading branch information
s975188062 committed Mar 9, 2020
1 parent 2187e50 commit b12e979
Show file tree
Hide file tree
Showing 712 changed files with 49,749 additions and 11 deletions.
1,397 changes: 1,397 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source "https://rubygems.org"
gemspec
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013-2020 Michael Rose and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
274 changes: 272 additions & 2 deletions README.md

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
require "bundler/gem_tasks"
require "jekyll"
require "listen"

def listen_ignore_paths(base, options)
[
/_config\.ya?ml/,
/_site/,
/\.jekyll-metadata/
]
end

def listen_handler(base, options)
site = Jekyll::Site.new(options)
Jekyll::Command.process_site(site)
proc do |modified, added, removed|
t = Time.now
c = modified + added + removed
n = c.length
relative_paths = c.map{ |p| Pathname.new(p).relative_path_from(base).to_s }
print Jekyll.logger.message("Regenerating:", "#{relative_paths.join(", ")} changed... ")
begin
Jekyll::Command.process_site(site)
puts "regenerated in #{Time.now - t} seconds."
rescue => e
puts "error:"
Jekyll.logger.warn "Error:", e.message
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
end
end
end

task :preview do
base = Pathname.new('.').expand_path
options = {
"source" => base.join('test').to_s,
"destination" => base.join('test/_site').to_s,
"force_polling" => false,
"serving" => true,
"theme" => "minimal-mistakes-jekyll"
}

options = Jekyll.configuration(options)

ENV["LISTEN_GEM_DEBUGGING"] = "1"
listener = Listen.to(
base.join("_data"),
base.join("_includes"),
base.join("_layouts"),
base.join("_sass"),
base.join("assets"),
options["source"],
:ignore => listen_ignore_paths(base, options),
:force_polling => options['force_polling'],
&(listen_handler(base, options))
)

begin
listener.start
Jekyll.logger.info "Auto-regeneration:", "enabled for '#{options["source"]}'"

unless options['serving']
trap("INT") do
listener.stop
puts " Halting auto-regeneration."
exit 0
end

loop { sleep 1000 }
end
rescue ThreadError
# You pressed Ctrl-C, oh my!
end

Jekyll::Commands::Serve.process(options)
end
Loading

0 comments on commit b12e979

Please sign in to comment.