kickster 0.2.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +1 -1
- data/README.md +58 -14
- data/kickster.gemspec +1 -1
- data/lib/kickster/version.rb +1 -1
- data/snippets/automated +41 -0
- data/snippets/travis.yml +15 -0
- data/template/.gitignore +1 -0
- data/template/.travis.yml +11 -0
- data/template/Gemfile +6 -5
- data/template/README.md.tt +8 -8
- data/template/_config.yml.tt +14 -14
- data/template/_layouts/default.html +0 -2
- data/template/apple-touch-icon.png +0 -0
- data/template/bin/deploy +17 -17
- data/template/bower.json.tt +1 -1
- data/template/favicon.ico +0 -0
- metadata +7 -4
- data/template/404.html +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39d4a15e78cf0ff3150cc1ad58c24c6699ebc1b6
|
4
|
+
data.tar.gz: 531f82623452317f33585786e1e26398d0961440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a89dba382f77fcd34a6a10e5bd92acb6c101fdef7c190a5df0114de803803e2fdeac68d06f508cd702a82561bb368815723ddd635306340e5bbfcff9e2d065fb
|
7
|
+
data.tar.gz: c3843aeb6605dac9a4b299d4ae4da6152261f91446cfb546392b3014117625d0042f8a0ee72260f78203315aeb7cd59750590d68dc4b18f53e2894804a8c1431
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
Kickster
|
2
2
|
========
|
3
3
|
|
4
|
-
|
4
|
+
[![Join the chat at https://gitter.im/nielsenramon/kickster](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nielsenramon/kickster?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
5
5
|
|
6
|
-
|
6
|
+
Jekyll starter template with GitHub Pages (automated) deploy to kickstart your project.
|
7
|
+
|
8
|
+
## Installation
|
7
9
|
|
8
10
|
Install the gem:
|
9
11
|
|
@@ -13,17 +15,15 @@ Execute gem and scaffold Kickster files:
|
|
13
15
|
|
14
16
|
kickster new site_name
|
15
17
|
|
16
|
-
|
18
|
+
Setup your environment:
|
17
19
|
|
18
20
|
bin/setup
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
*If you do not want the Kickster files but just the deploy then copy `bin/setup` script to your repo and your ready to go.*
|
22
|
+
*If you do not want the Kickster files but just the deploy then copy the `bin/deploy` script to your repo and your ready to go.*
|
23
23
|
|
24
|
-
|
24
|
+
## Development
|
25
25
|
|
26
|
-
Run Jekyll
|
26
|
+
Run Jekyll:
|
27
27
|
|
28
28
|
bundle exec jekyll serve --watch
|
29
29
|
|
@@ -34,23 +34,67 @@ Used tools:
|
|
34
34
|
- Influences from [HTML5 Boilerplate](https://html5boilerplate.com/)
|
35
35
|
- [Autoprefixer](https://github.com/postcss/autoprefixer)
|
36
36
|
|
37
|
-
|
37
|
+
## Manual deploy to GitHub Pages
|
38
|
+
|
39
|
+
Run this in the root project folder in your console:
|
40
|
+
|
41
|
+
bin/deploy
|
42
|
+
|
43
|
+
Thats it, enjoy your nicely build project on GitHub pages!
|
44
|
+
|
45
|
+
## Automated deployment with TravisCI
|
46
|
+
|
47
|
+
Automated deployment is not by default included in your generated Kickster project. Please follow the steps below to include automated deployment.
|
48
|
+
|
49
|
+
*Note that changes will only deploy when your code is merged into master.*
|
50
|
+
|
51
|
+
#### 1. Copy the required automated deploy script
|
52
|
+
|
53
|
+
Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/automated) script inside the `/bin` folder of your project.
|
54
|
+
|
55
|
+
#### 2. Update `.travis.yml`
|
56
|
+
|
57
|
+
Replace your `.travis.yml` file with [this](https://github.com/nielsenramon/kickster/blob/master/snippets/.travis.yml) one.
|
58
|
+
And adjust the following 2 lines with your information:
|
59
|
+
|
60
|
+
- USERNAME: <your-github-username>
|
61
|
+
- EMAIL: <your-github-email>
|
62
|
+
|
63
|
+
#### 3. Create a personal access token
|
64
|
+
|
65
|
+
This is required to push to the GitHub repo from a script.
|
66
|
+
|
67
|
+
In GitHub go to `settings > Personal access tokens` and create a new one.
|
68
|
+
First give it a proper name so it is easy to recognize later. Then check `repo` (check `public_repo` if it is a public repository) and click on create.
|
69
|
+
|
70
|
+
<img src="https://dl.dropboxusercontent.com/u/20823269/kickster-token.png" alt="Screenshot of token generation in GitHub">
|
71
|
+
|
72
|
+
Copy the generated token.
|
73
|
+
|
74
|
+
*Don't forget to enable your repository in [Travis CI](https://travis-ci.org/)*
|
75
|
+
|
76
|
+
Go back to your project in terminal and input the following:
|
77
|
+
|
78
|
+
gem install travis
|
79
|
+
travis encrypt GITHUB_TOKEN=secret-token-from-github --add
|
80
|
+
|
81
|
+
This added a line inside your `.travis.yml' file like this:
|
38
82
|
|
39
|
-
|
83
|
+
secure: <encrypted token>
|
40
84
|
|
41
|
-
|
85
|
+
That's it, enjoy your automated deployments from now on!
|
42
86
|
|
43
|
-
|
87
|
+
## Why
|
44
88
|
|
45
89
|
Setting up GitHub Pages websites with Jekyll for projects or clients is cumbersome as you have to setup everything from scratch. Kickster helps you kickstart your project settling you with a basic starter template and easy deploy. Deploying is completed in 1 second so updating your website or prototype is a breeze.
|
46
90
|
|
47
91
|
You can find example project [here](https://github.com/nielsenramon/kickster/tree/website).
|
48
92
|
|
49
|
-
|
93
|
+
## License
|
50
94
|
|
51
95
|
MIT License
|
52
96
|
|
53
|
-
|
97
|
+
## Contributing
|
54
98
|
|
55
99
|
1. Fork it ( https://github.com/[my-github-username]/kickster/fork )
|
56
100
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
data/kickster.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.platform = Gem::Platform::RUBY
|
8
8
|
spec.author = "Nielsen Ramon"
|
9
9
|
spec.summary = "Hassle-free deploying to GitHub Pages with Jekyll."
|
10
|
-
spec.description = "Jekyll starter template with GitHub Pages deploy to kickstart your project."
|
10
|
+
spec.description = "Jekyll starter template with GitHub Pages (automated) deploy to kickstart your project."
|
11
11
|
spec.email = "nielsenramon1@gmail.com"
|
12
12
|
spec.homepage = "http://kickster.nielsenramon.com/"
|
13
13
|
spec.license = "MIT"
|
data/lib/kickster/version.rb
CHANGED
data/snippets/automated
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
ORIGIN_URL=`git config --get remote.origin.url`
|
4
|
+
ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com}
|
5
|
+
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
6
|
+
|
7
|
+
echo "Started deploying to the gh-pages branch."
|
8
|
+
|
9
|
+
echo "Creating clean gh-pages branch."
|
10
|
+
if [ `git branch | grep gh-pages` ]
|
11
|
+
then
|
12
|
+
git branch -D gh-pages
|
13
|
+
fi
|
14
|
+
git checkout -b gh-pages
|
15
|
+
|
16
|
+
echo "Building site."
|
17
|
+
bower install
|
18
|
+
bundle exec jekyll build --destination temp || exit 1
|
19
|
+
|
20
|
+
echo "Removing old files"
|
21
|
+
find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
22
|
+
|
23
|
+
mv temp/* . || exit 1
|
24
|
+
rm -R temp/ || exit 1
|
25
|
+
|
26
|
+
echo "Pushing content"
|
27
|
+
git config user.name "$USERNAME"
|
28
|
+
git config user.email "$EMAIL"
|
29
|
+
|
30
|
+
git add -fA || exit 1
|
31
|
+
git commit --allow-empty -m "$COMMIT_MESSAGE" || exit 1
|
32
|
+
|
33
|
+
git push -f -q "$ORIGIN_CREDENTIALS" gh-pages > /dev/null 2>&1
|
34
|
+
|
35
|
+
echo "Deployed Successfully"
|
36
|
+
|
37
|
+
echo "Checking out previous branch"
|
38
|
+
git checkout -
|
39
|
+
bower install
|
40
|
+
|
41
|
+
exit 0
|
data/snippets/travis.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.2.3
|
4
|
+
install:
|
5
|
+
- ./bin/setup
|
6
|
+
script:
|
7
|
+
- bundle exec jekyll build --trace
|
8
|
+
- bundle exec htmlproof ./_site --only-4xx
|
9
|
+
after_success:
|
10
|
+
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && "./bin/travis-deploy"
|
11
|
+
env:
|
12
|
+
global:
|
13
|
+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
14
|
+
- USERNAME: <your-github-username>
|
15
|
+
- EMAIL: <your-github-email>
|
data/template/.gitignore
CHANGED
data/template/Gemfile
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "autoprefixer-rails", "~> 6.1
|
4
|
-
gem "
|
5
|
-
gem "jekyll
|
3
|
+
gem "autoprefixer-rails", "~> 6.1.0.1"
|
4
|
+
gem "html-proofer", "~> 2.5.2"
|
5
|
+
gem "jekyll", "~> 3.0.1"
|
6
|
+
gem "jekyll-assets", "~> 2.0.2"
|
6
7
|
gem "jekyll-sitemap", "~> 0.9.0"
|
7
|
-
gem "sass", "~> 3.4
|
8
|
-
gem "uglifier", "~> 2.7
|
8
|
+
gem "sass", "~> 3.4.19"
|
9
|
+
gem "uglifier", "~> 2.7.2"
|
data/template/README.md.tt
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
# <%= camel_name %>
|
2
2
|
|
3
|
-
|
3
|
+
## Installation
|
4
4
|
|
5
|
-
|
5
|
+
Setup your environment:
|
6
6
|
|
7
7
|
bin/setup
|
8
8
|
|
9
|
-
|
9
|
+
## Development
|
10
10
|
|
11
|
-
Run Jekyll
|
11
|
+
Run Jekyll:
|
12
12
|
|
13
13
|
bundle exec jekyll serve --watch
|
14
14
|
|
15
15
|
Used tools:
|
16
|
-
- [Jekyll assets](
|
16
|
+
- [Jekyll assets](https://github.com/jekyll/jekyll-assets)
|
17
17
|
- [Bower](http://bower.io/)
|
18
18
|
- [Jekyll](http://jekyllrb.com/)
|
19
19
|
- Influences from [HTML5 Boilerplate](https://html5boilerplate.com/)
|
20
20
|
- [Autoprefixer](https://github.com/postcss/autoprefixer)
|
21
21
|
|
22
|
-
|
22
|
+
## Deploy to GitHub Pages
|
23
23
|
|
24
|
-
Run this
|
24
|
+
Run this in the root project folder in your console:
|
25
25
|
|
26
|
-
bin/deploy
|
26
|
+
bin/deploy
|
data/template/_config.yml.tt
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
permalink: pretty
|
2
|
-
name: <%= snake_name %>
|
3
|
-
|
4
|
-
exclude:
|
5
|
-
- .bowerrc
|
6
|
-
- .scss-lint.yml
|
7
|
-
- Gemfile
|
8
|
-
- Gemfile.lock
|
9
|
-
- README.md
|
10
|
-
- bower.json
|
11
|
-
- bin/*
|
12
|
-
|
13
1
|
assets:
|
14
2
|
sources:
|
15
3
|
- _assets/fonts
|
@@ -19,10 +7,22 @@ assets:
|
|
19
7
|
- _vendor/
|
20
8
|
|
21
9
|
baseurl: /
|
22
|
-
|
10
|
+
|
11
|
+
exclude:
|
12
|
+
- .bowerrc
|
13
|
+
- .travis.yml
|
14
|
+
- bin/*
|
15
|
+
- bower.json
|
16
|
+
- Gemfile
|
17
|
+
- Gemfile.lock
|
18
|
+
- README.md
|
19
|
+
|
20
|
+
ga_analytics: UA-XXXXXXXX-X
|
23
21
|
|
24
22
|
gems:
|
25
23
|
- jekyll-assets
|
26
24
|
- jekyll-sitemap
|
27
25
|
|
28
|
-
|
26
|
+
name: <%= snake_name %>
|
27
|
+
|
28
|
+
permalink: pretty
|
@@ -3,9 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
6
|
-
|
7
6
|
<title>{{ site.name }} | {{ page.title }}</title>
|
8
|
-
|
9
7
|
<meta name="description" content="{{ page.description }}">
|
10
8
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
11
9
|
|
Binary file
|
data/template/bin/deploy
CHANGED
@@ -1,15 +1,13 @@
|
|
1
|
-
#!/bin/sh
|
1
|
+
#!/usr/bin/env sh
|
2
2
|
|
3
3
|
# Run this script to deploy the app to Github Pages.
|
4
4
|
|
5
|
+
# Exit if any subcommand fails
|
5
6
|
set -e
|
6
7
|
|
7
|
-
|
8
|
-
then
|
9
|
-
echo 'Usage: bin/deploy "{commit message}"'
|
10
|
-
exit 1
|
11
|
-
fi
|
8
|
+
echo "Started deploying"
|
12
9
|
|
10
|
+
# Checkout gh-pages branch.
|
13
11
|
if [ `git branch | grep gh-pages` ]
|
14
12
|
then
|
15
13
|
git branch -D gh-pages
|
@@ -17,23 +15,25 @@ fi
|
|
17
15
|
|
18
16
|
git checkout -b gh-pages
|
19
17
|
|
18
|
+
# Generate site.
|
20
19
|
bower install
|
21
|
-
bundle exec jekyll build --destination
|
20
|
+
bundle exec jekyll build --destination temp
|
22
21
|
|
22
|
+
# Port everyting needed inside temp folder.
|
23
23
|
mkdir tmp
|
24
|
-
|
25
|
-
cp -a .gitignore tmp
|
26
|
-
cp -R .git tmp
|
27
|
-
|
28
|
-
find . -maxdepth 1 ! -name 'tmp' -exec rm -rf {} \;
|
24
|
+
find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
29
25
|
|
30
|
-
|
31
|
-
|
26
|
+
# Move site to root and cleanup files.
|
27
|
+
mv temp/* .
|
28
|
+
rm -R temp/
|
32
29
|
|
30
|
+
# Push to gh-pages
|
33
31
|
git add -fA
|
34
|
-
git commit -m "$1"
|
35
|
-
|
36
|
-
git push -f origin gh-pages
|
32
|
+
git commit --allow-empty -m "$(git log -1 --pretty=%B)"
|
33
|
+
git push -f -q origin gh-pages
|
37
34
|
|
35
|
+
# Move back to previous branch
|
38
36
|
git checkout -
|
39
37
|
bower install
|
38
|
+
|
39
|
+
echo "Deployed Successfully!"
|
data/template/bower.json.tt
CHANGED
data/template/favicon.ico
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kickster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nielsen Ramon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -52,7 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
-
description: Jekyll starter template with GitHub Pages deploy to kickstart
|
55
|
+
description: Jekyll starter template with GitHub Pages (automated) deploy to kickstart
|
56
|
+
your project.
|
56
57
|
email: nielsenramon1@gmail.com
|
57
58
|
executables:
|
58
59
|
- kickster
|
@@ -71,10 +72,12 @@ files:
|
|
71
72
|
- lib/kickster/generator.rb
|
72
73
|
- lib/kickster/install.rb
|
73
74
|
- lib/kickster/version.rb
|
75
|
+
- snippets/automated
|
76
|
+
- snippets/travis.yml
|
74
77
|
- template/.bowerrc
|
75
78
|
- template/.gitignore
|
76
79
|
- template/.ruby-version
|
77
|
-
- template
|
80
|
+
- template/.travis.yml
|
78
81
|
- template/Gemfile
|
79
82
|
- template/README.md.tt
|
80
83
|
- template/_assets/fonts/.keep
|
data/template/404.html
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title>Page Not Found</title>
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
-
<style type="text/css">
|
8
|
-
* {
|
9
|
-
line-height: 1.2;
|
10
|
-
margin: 0;
|
11
|
-
}
|
12
|
-
|
13
|
-
html {
|
14
|
-
color: #888;
|
15
|
-
display: table;
|
16
|
-
font-family: sans-serif;
|
17
|
-
height: 100%;
|
18
|
-
text-align: center;
|
19
|
-
width: 100%;
|
20
|
-
}
|
21
|
-
|
22
|
-
body {
|
23
|
-
display: table-cell;
|
24
|
-
vertical-align: middle;
|
25
|
-
margin: 2em auto;
|
26
|
-
}
|
27
|
-
|
28
|
-
h1 {
|
29
|
-
color: #555;
|
30
|
-
font-size: 2em;
|
31
|
-
font-weight: 400;
|
32
|
-
}
|
33
|
-
|
34
|
-
p {
|
35
|
-
margin: 0 auto;
|
36
|
-
width: 280px;
|
37
|
-
}
|
38
|
-
|
39
|
-
@media only screen and (max-width: 280px) {
|
40
|
-
body, p { width: 95%; }
|
41
|
-
|
42
|
-
h1 {
|
43
|
-
font-size: 1.5em;
|
44
|
-
margin: 0 0 0.3em;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
<body>
|
50
|
-
<h1>Page Not Found</h1>
|
51
|
-
<p>Sorry, but the page you were trying to view does not exist.</p>
|
52
|
-
</body>
|
53
|
-
</html>
|