Skip to content

Commit 61d0854

Browse files
committed
Add pixyll.gemspec
1 parent e510150 commit 61d0854

File tree

7 files changed

+106
-6
lines changed

7 files changed

+106
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ _site
77
_config.gh-pages.yml
88

99
Gemfile.lock
10+
*.gem

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ rvm:
66
- 2.4
77
- 2.5
88
- 2.6
9+
env:
10+
- JEKYLL_VERSION: "~> 3.4.5"
11+
- JEKYLL_VERSION: "~> 3.5.2"
12+
- JEKYLL_VERSION: "~> 3.6.3"
13+
- JEKYLL_VERSION: "~> 3.7.4"
14+
- JEKYLL_VERSION: "~> 3.8"
15+
before_install:
16+
- gem install --no-document -v "${JEKYLL_VERSION}" jekyll
917
script:
18+
- bundle exec jekyll --version
1019
- bundle exec jekyll build
1120
- rake 'draft[Hello\, world]'
1221
- rake undraft[hello-world.md]
@@ -15,3 +24,17 @@ script:
1524
- grep pagination-item _site/index.html
1625
- grep johnotander/pixyll _site/css/pixyll.css
1726
- grep 404 _site/404.html
27+
- gem build pixyll.gemspec
28+
- bundle exec jekyll new pixyll-example
29+
- cd pixyll-example
30+
- bundle install
31+
- mv index.md index.html
32+
- "sed -i~ -e 's/layout: home/layout: default/' index.html"
33+
- "echo paginate: 1 >> _config.yml"
34+
- "sed -i~ -e 's/minima/pixyll/' _config.yml"
35+
- "sed -i~ -e '/^gems:/a\\\n\\ \\ -\\ jekyll-paginate\n' _config.yml"
36+
- "sed -i~ -e '/^plugins:/a\\\n\\ \\ -\\ jekyll-paginate\n' _config.yml"
37+
- "sed -i~ -e 's/minima/pixyll/' Gemfile"
38+
- "sed -i~ -e '/the default theme/d' Gemfile"
39+
- bundle exec jekyll build
40+
- grep pixyll _site/index.html

Gemfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
source 'https://rubygems.org'
2-
3-
# A simple Ruby Gem to bootstrap dependencies for setting up and
4-
# maintaining a local Jekyll environment in sync with GitHub Pages
5-
# https://github.com/github/pages-gem
2+
gemspec
63
gem 'github-pages'

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,29 @@ This Jekyll theme was crafted with <3 by [John Otander](http://johnotander.com)
1818
If you're completely new to Jekyll, I recommend checking out the documentation at <http://jekyllrb.com> or there's a tutorial by [Smashing Magazine](http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/).
1919

2020
```
21-
$ git clone [email protected]:johnotander/pixyll.git
21+
$ git clone -o upstream [email protected]:johnotander/pixyll.git
2222
$ cd pixyll
2323
$ gem install bundler # If you don't have bundler installed
2424
$ bundle install
2525
```
2626

27+
Alternatively, if want to install the theme as a Gem, you can add this
28+
line to your Gemfile:
29+
30+
```ruby
31+
gem "pixyll"
32+
```
33+
34+
Then, add this line to your Jekyll site:
35+
36+
```yaml
37+
theme: pixyll
38+
```
39+
40+
And then execute:
41+
42+
$ bundle install
43+
2744
#### Verify your Jekyll version
2845
2946
It's important to also check your version of Jekyll since this project uses new `baseurl` features that are [only supported in 3.3+](https://jekyllrb.com/news/2016/10/06/jekyll-3-3-is-here/).
@@ -32,6 +49,13 @@ It's important to also check your version of Jekyll since this project uses new
3249

3350
Fork the repo, and then clone it so you've got the code locally.
3451

52+
If `git remote -v` doesn't have your fork listed, you can do the following to add it:
53+
54+
```
55+
git remote add origin [email protected]:USER/pixyll.git
56+
```
57+
58+
Where `USER` above is your GitHub user name.
3559

3660
### Modify the `_config.yml`
3761

@@ -67,6 +91,21 @@ Now you can navigate to `localhost:4000` in your browser to see the site.
6791
6892
You can host your Jekyll site for free with Github Pages. [Click here](https://pages.github.com/) for more information.
6993
94+
If you are using the gem (see above), then you need to add the the
95+
github-pages gem to your Gemfile:
96+
97+
```ruby
98+
gem 'github-pages'
99+
```
100+
101+
Alternatively, you can enable Pixyll on Githug Pages using the `remote_theme` feature, by adding this line to your `_config.yml`:
102+
103+
```yml
104+
remote_theme: johno/pixyll
105+
```
106+
107+
See [Adding a Jekyll theme to your GitHub pages](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site).
108+
70109
#### A configuration tweak if you're using a gh-pages sub-folder
71110
72111
In addition to your github-username.github.io repo that maps to the root url, you can serve up sites by using a gh-pages branch for other repos so they're available at github-username.github.io/repo-name.

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,5 @@ exclude:
126126
- Gemfile
127127
- Gemfile.lock
128128
- vendor
129+
- pixyll.gemspec
130+
- '*.gem'

appveyor.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# appveyor.yml
22

33
environment:
4-
RUBY_VERSION: 25
4+
matrix:
5+
- RUBY_VERSION: 24
6+
JEKYLL_VERSION: "~> 3.5.2"
7+
- RUBY_VERSION: 24
8+
JEKYLL_VERSION: "~> 3.6.3"
9+
- RUBY_VERSION: 25
10+
JEKYLL_VERSION: "~> 3.6.3"
11+
- RUBY_VERSION: 25
12+
JEKYLL_VERSION: "~> 3.7.4"
13+
- RUBY_VERSION: 26
14+
JEKYLL_VERSION: "~> 3.7.4"
15+
- RUBY_VERSION: 26
16+
JEKYLL_VERSION: "~> 3.8"
517

618
platform:
719
- x64
820

921
install:
1022
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
1123
- bundle install
24+
- gem install --no-document -v "%JEKYLL_VERSION%" jekyll
1225

1326
before_build:
1427
- ruby -v
@@ -21,3 +34,4 @@ build_script:
2134
- bundle exec jekyll build
2235
- rake 'draft[Hello\, world]'
2336
- rake undraft[hello-world.md]
37+
- gem build pixyll.gemspec

pixyll.gemspec

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# coding: utf-8
2+
3+
Gem::Specification.new do |spec|
4+
spec.name = "pixyll"
5+
spec.version = "3.0.0"
6+
spec.authors = ["John Otander"]
7+
spec.email = ["[email protected]"]
8+
9+
spec.summary = %q{A simple, beautiful Jekyll theme that's mobile first.}
10+
spec.homepage = "http://pixyll.com"
11+
spec.license = "MIT"
12+
13+
spec.metadata["plugin_type"] = "theme"
14+
15+
spec.files = `git ls-files -z`.split("\x0").select do |f|
16+
f.match(%r{^((_includes|_layouts|_sass|css)/|Rakefile|(LICENSE|README)((\.(txt|md|markdown)|$)))}i)
17+
end
18+
19+
spec.add_runtime_dependency "jekyll", "~> 3.3"
20+
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
21+
spec.add_development_dependency "bundler", ">= 1.12"
22+
spec.add_development_dependency "rake", "~> 10.0"
23+
24+
end

0 commit comments

Comments
 (0)