-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Larry Gadallah
committed
Sep 16, 2023
1 parent
b08bab1
commit 5ecee3a
Showing
166 changed files
with
33,150 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
_site | ||
.sass-cache | ||
.jekyll-metadata | ||
.DS_Store | ||
# Vim | ||
*~ | ||
*.sw[p_] | ||
|
||
# Sublime Text | ||
*.sublime-project | ||
*.sublime-workspace | ||
|
||
# Ruby Gem | ||
*.gem | ||
.bundle | ||
Gemfile.lock | ||
**/vendor/bundle | ||
|
||
# Node.js and NPM | ||
node_modules | ||
npm-debug.log* | ||
package-lock.json | ||
codekit-config.json | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# Jekyll generated files | ||
.jekyll-cache | ||
.jekyll-metadata | ||
.sass-cache | ||
_asset_bundler_cache | ||
_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
BSD 3-Clause License | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019, Larry Gadallah | ||
All rights reserved. | ||
Copyright (c) 2013-2020 Michael Rose and contributors | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
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: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.