Skip to content

Commit

Permalink
init blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirone7 committed Jun 26, 2018
0 parents commit 970344e
Show file tree
Hide file tree
Showing 162 changed files with 19,006 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*.gem
*.sublime-project
*.sublime-workspace
.bundle
.DS_Store
.jekyll-metadata
.sass-cache
_asset_bundler_cache
_site
codekit-config.json
example/_site
Gemfile.lock
node_modules
npm-debug.log*
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: ruby
cache: bundler

install:
# Install Jekyll and dependencies
- bundle install

script:
- bundle exec rake site:deploy --quiet
branches:
only:
# Change this to gh-pages if you're deploying using the gh-pages branch
- master
rvm:
- 2.4.2

env:
global:
secure: "ia7PbV+6l2B0b9rBDRfAXclv1NDkfNFKqieuDCwEI6P6k1tqinanHhwu1tDd2iEzCG81M714VVNb9h9ldXA8CJShrkd0d39dYGLFP9fiGoAHudG3Brj82HWeasI2PgdVTAGjqWONWxqUHwqRWorqXNkTv2S/iancT9qvtQ2z1O45YzDXLLOxmCxbpesB/d1b2TEqosMKVDKTRuAoHOzXrXUn7JxDgeHIfNn8Jfl8aRO+yq1wSRuUWLQAuNdJBZWx/ygt7CVUJ51MR6XqPUscB2a4SbvLaRPEc66enseA060az02m5x60nXvsTgfty2vBq6pYlFCPWBYIn2nMK7cmV1mw1czZoxHDyVXYJ9YJaYaEJBi82SJc6V5inS+ggT23yth80+nQti1BGx/LsAccs5b1qbrxJnBjIhwnnw+X+nqwDzg2fezN5Ap85AUCnnRNXGf60Y2X34HONCOY1RB6NEc6hlS69A4BMt0ieTB5QfuswTP1z4m5+c898o9PsnbJX6U5w5wVwlIrGVPJBMaXbnsP6a0l/PRvSi+tNZ0b9Jyn92JBQPyXhIhyKJDyhc6uPz704caINzxRLVFLevTs9h2rOXLAQ+4QxkneD0l4dS4/l3zR+DAPeA4txDpcg7yLMyV9dD9hepBVr3CdCRC7z8XKkSgBOR9C9hv9c20KKks="

8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gem "minimal-mistakes-jekyll"

gem "jekyll", "~> 3.6.2"
gem "github-pages", "~> 168"
gem "rake", "~> 12.3.0"
gem 'algoliasearch-jekyll', '~> 0.4.3'
63 changes: 63 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
The MIT License (MIT)

Copyright (c) 2013-2018 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.

Minimal Mistakes incorporates icons from [The Noun Project](https://thenounproject.com/)
creators Garrett Knoll, Arthur Shlain, and Tracy Tam.
Icons are distributed under Creative Commons Attribution 3.0 United States (CC BY 3.0 US).

Minimal Mistakes incorporates [Font Awesome](http://fontawesome.io/),
Copyright (c) 2017 Dave Gandy.
Font Awesome is distributed under the terms of the [SIL OFL 1.1](http://scripts.sil.org/OFL)
and [MIT License](http://opensource.org/licenses/MIT).

Minimal Mistakes incorporates photographs from [Unsplash](https://unsplash.com).

Minimal Mistakes incorporates [Susy](http://susy.oddbird.net/),
Copyright (c) 2017, Miriam Eric Suzanne.
Susy is distributed under the terms of the [BSD 3-clause "New" or "Revised" License](https://opensource.org/licenses/BSD-3-Clause).

Minimal Mistakes incorporates [Breakpoint](http://breakpoint-sass.com/).
Breakpoint is distributed under the terms of the [MIT/GPL Licenses](http://opensource.org/licenses/MIT).

Minimal Mistakes incorporates [FitVids.js](https://github.com/davatron5000/FitVids.js/),
Copyright (c) 2013 Dave Rubert and Chris Coyier.
FitVids is distributed under the terms of the [WTFPL License](http://sam.zoy.org/wtfpl/).

Minimal Mistakes incorporates [Magnific Popup](http://dimsemenov.com/plugins/magnific-popup/),
Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com.
Magnific Popup is distributed under the terms of the MIT License.

Minimal Mistakes incorporates [jQuery Smooth Scroll](https://github.com/kswedberg/jquery-smooth-scroll),
Copyright (c) 2017 Karl Swedberg.
jQuery Smooth Scroll is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Minimal Mistakes incorporates [GreedyNav.js](https://github.com/lukejacksonn/GreedyNav),
Copyright (c) 2015 Luke Jackson.
GreedyNav.js is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Minimal Mistakes incorporates [Jekyll Group-By-Array](https://github.com/mushishi78/jekyll-group-by-array),
Copyright (c) 2015 Max White <[email protected]>.
Jekyll Group-By-Array is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Minimal Mistakes incorporates [Lunr](http://lunrjs.com),
Copyright (c) 2017 Oliver Nightingale.
Lunr is distributed under the terms of the [MIT License](http://opensource.org/licenses/MIT).
74 changes: 74 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
require "jekyll"
require "listen"
require 'rake'
require 'date'
require 'yaml'


CONFIG = YAML.load(File.read('_config.yml'))
USERNAME = CONFIG["username"]
REPO = CONFIG["repo"]
SOURCE_BRANCH = CONFIG["branch"]
DESTINATION_BRANCH = "gh-pages"

def check_destination
unless Dir.exist? CONFIG["destination"]
sh "git clone https://$GIT_NAME:[email protected]/#{USERNAME}/#{REPO}.git #{CONFIG["destination"]}"
end
end

namespace :site do
desc "Generate the site"
task :build do
check_destination
sh "bundle exec jekyll build"
end

desc "Generate the site and serve locally"
task :serve do
check_destination
sh "bundle exec jekyll serve"
end

desc "Generate the site, serve locally and watch for changes"
task :watch do
sh "bundle exec jekyll serve --watch"
end

desc "Generate the site and push changes to remote origin"
task :deploy do
# Detect pull request
if ENV['TRAVIS_PULL_REQUEST'].to_s.to_i > 0
puts 'Pull request detected. Not proceeding with deploy.'
exit
end

# Configure git if this is run in Travis CI
if ENV["TRAVIS"]
sh "git config --global user.name $GIT_NAME"
sh "git config --global user.email $GIT_EMAIL"
sh "git config --global push.default simple"
end

# Make sure destination folder exists as git repo
check_destination

sh "git checkout #{SOURCE_BRANCH}"
Dir.chdir(CONFIG["destination"]) { sh "git checkout #{DESTINATION_BRANCH}" }

# Generate the site
sh "bundle exec jekyll build"

# Commit and push to github
sha = `git log`.match(/[a-z0-9]{40}/)[0]
Dir.chdir(CONFIG["destination"]) do
# check if there is anything to add and commit, and pushes it
sh "if [ -n '$(git status)' ]; then
git add --all .;
git commit -m 'Updating to #{USERNAME}/#{REPO}@#{sha}.';
git push --quiet origin #{DESTINATION_BRANCH};
fi"
puts "Pushed updated branch #{DESTINATION_BRANCH} to GitHub Pages"
end
end
end
Loading

0 comments on commit 970344e

Please sign in to comment.