Skip to content

Commit

Permalink
Gemspec (#1)
Browse files Browse the repository at this point in the history
* Add pixyll.gemspec

* Move pixyll.scss to assets/css/main.scss

* Move index.html to _layouts/home.html

* Move favicons to assets/img

* Move contact.html to _layouts/contact.html

Co-authored-by: Aaron S. Hawley <[email protected]>
  • Loading branch information
kosalaperera and ashawley authored Jul 17, 2020
1 parent ae260b5 commit 9c81b4b
Show file tree
Hide file tree
Showing 30 changed files with 213 additions and 98 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ _site
_config.gh-pages.yml

Gemfile.lock
*.gem
34 changes: 33 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,44 @@ rvm:
- 2.4
- 2.5
- 2.6
env:
- JEKYLL_VERSION: "~> 3.4.5"
- JEKYLL_VERSION: "~> 3.5.2"
- JEKYLL_VERSION: "~> 3.6.3"
- JEKYLL_VERSION: "~> 3.7.4"
- JEKYLL_VERSION: "~> 3.8"
before_install:
- gem install --no-document -v "${JEKYLL_VERSION}" jekyll
script:
- bundle exec jekyll --version
- bundle exec jekyll build
- rake 'draft[Hello\, world]'
- rake undraft[hello-world.md]
- grep johnotander/pixyll _site/index.html
- grep post-title _site/index.html
- grep pagination-item _site/index.html
- grep johnotander/pixyll _site/css/pixyll.css
- grep johnotander/pixyll _site/assets/css/main.css
- grep 404 _site/404.html
- gem build pixyll.gemspec
- bundle exec jekyll new pixyll-example
- cd pixyll-example
- bundle install
- mv index.md index.html
- "echo paginate: 1 >> _config.yml"
- "sed -i~ -e 's/minima/pixyll/' _config.yml"
- "sed -i~ -e '/^gems:/a\\\n\\ \\ -\\ jekyll-paginate\n' _config.yml"
- "sed -i~ -e '/^plugins:/a\\\n\\ \\ -\\ jekyll-paginate\n' _config.yml"
- "sed -i~ -e 's/minima/pixyll/' Gemfile"
- "sed -i~ -e '/the default theme/d' Gemfile"
- "echo --- > _posts/$(date -u +'%Y-%m-%d')-hello-world.md"
- "echo layout: post >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- "echo title: Hello, world >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- "echo -n 'date: ' >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- "echo $(date -u +'%Y-%m-%d %H:%M:%S +0000') >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- "echo --- >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- "echo 'Hello, world!' >> _posts/$(date -u '+%Y-%m-%d')-hello-world.md"
- bundle exec jekyll build
- grep pixyll _site/index.html
- grep post-title _site/index.html
- grep pagination-item _site/index.html
- grep Newer _site/index.html
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
source 'https://rubygems.org'

# A simple Ruby Gem to bootstrap dependencies for setting up and
# maintaining a local Jekyll environment in sync with GitHub Pages
# https://github.com/github/pages-gem
gemspec
gem 'github-pages'
41 changes: 40 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,29 @@ This Jekyll theme was crafted with <3 by [John Otander](http://johnotander.com)
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/).

```
$ git clone [email protected]:johnotander/pixyll.git
$ git clone -o upstream [email protected]:johnotander/pixyll.git
$ cd pixyll
$ gem install bundler # If you don't have bundler installed
$ bundle install
```

Alternatively, if want to install the theme as a Gem, you can add this
line to your Gemfile:

```ruby
gem "pixyll"
```

Then, add this line to your Jekyll site:

```yaml
theme: pixyll
```
And then execute:
$ bundle install
#### Verify your Jekyll version
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/).
Expand All @@ -32,6 +49,13 @@ It's important to also check your version of Jekyll since this project uses new

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

If `git remote -v` doesn't have your fork listed, you can do the following to add it:

```
git remote add origin [email protected]:USER/pixyll.git
```

Where `USER` above is your GitHub user name.

### Modify the `_config.yml`

Expand Down Expand Up @@ -67,6 +91,21 @@ Now you can navigate to `localhost:4000` in your browser to see the site.
You can host your Jekyll site for free with Github Pages. [Click here](https://pages.github.com/) for more information.
If you are using the gem (see above), then you need to add the the
github-pages gem to your Gemfile:
```ruby
gem 'github-pages'
```

Alternatively, you can enable Pixyll on Githug Pages using the `remote_theme` feature, by adding this line to your `_config.yml`:

```yml
remote_theme: johno/pixyll
```
See [Adding a Jekyll theme to your GitHub pages](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site).
#### A configuration tweak if you're using a gh-pages sub-folder
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.
Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ exclude:
- README.md
- screenshot.png
- vendor
- pixyll.gemspec
- '*.gem'
32 changes: 16 additions & 16 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<link rel="alternate" type="application/rss+xml" title="RSS Feed for {{ site.title }}" href="{{ "/feed.xml" | relative_url }}" />

<!-- Custom CSS -->
<link rel="stylesheet" href="{{ "/css/pixyll.css" | relative_url }}?{{ site.time | date: "%Y%m%d%H%M" }}" type="text/css">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}?{{ site.time | date: "%Y%m%d%H%M" }}" type="text/css">

<!-- Fonts -->
{% if site.extended_fonts %}
Expand Down Expand Up @@ -80,21 +80,21 @@
{% endif %}

<!-- Icons -->
<link rel="apple-touch-icon" sizes="57x57" href="{{ "/apple-touch-icon-57x57.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "/apple-touch-icon-114x114.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "/apple-touch-icon-72x72.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ "/apple-touch-icon-144x144.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "/apple-touch-icon-60x60.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "/apple-touch-icon-120x120.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "/apple-touch-icon-76x76.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "/apple-touch-icon-152x152.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon-180x180.png" | relative_url }}">
<link rel="icon" type="image/png" href="{{ "/favicon-192x192.png" | relative_url }}" sizes="192x192">
<link rel="icon" type="image/png" href="{{ "/favicon-160x160.png" | relative_url }}" sizes="160x160">
<link rel="icon" type="image/png" href="{{ "/favicon-96x96.png" | relative_url }}" sizes="96x96">
<link rel="icon" type="image/png" href="{{ "/favicon-16x16.png" | relative_url }}" sizes="16x16">
<link rel="icon" type="image/png" href="{{ "/favicon-32x32.png" | relative_url }}" sizes="32x32">
<link rel="shortcut icon" href="{{ "/favicon.ico" | relative_url }}">
<link rel="apple-touch-icon" sizes="57x57" href="{{ "/assets/img/apple-touch-icon-57x57.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ "/assets/img/apple-touch-icon-114x114.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ "/assets/img/apple-touch-icon-72x72.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ "/assets/img/apple-touch-icon-144x144.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ "/assets/img/apple-touch-icon-60x60.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ "/assets/img/apple-touch-icon-120x120.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ "/assets/img/apple-touch-icon-76x76.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ "/assets/img/apple-touch-icon-152x152.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/img/apple-touch-icon-180x180.png" | relative_url }}">
<link rel="icon" type="image/png" href="{{ "/assets/img/favicon-192x192.png" | relative_url }}" sizes="192x192">
<link rel="icon" type="image/png" href="{{ "/assets/img/favicon-160x160.png" | relative_url }}" sizes="160x160">
<link rel="icon" type="image/png" href="{{ "/assets/img/favicon-96x96.png" | relative_url }}" sizes="96x96">
<link rel="icon" type="image/png" href="{{ "/assets/img/favicon-16x16.png" | relative_url }}" sizes="16x16">
<link rel="icon" type="image/png" href="{{ "/assets/img/favicon-32x32.png" | relative_url }}" sizes="32x32">
<link rel="shortcut icon" href="{{ "/assets/img/favicon.ico" | relative_url }}">

{% if site.google_analytics %}
<script type="text/javascript">
Expand Down
44 changes: 44 additions & 0 deletions _layouts/contact.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
layout: page
---

<div class="py2">
{% if site.ajaxify_contact_form %}
<form class="form-stacked">
<label>
Email
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email | default: "Email Address" }}">
</label>

<label>
Content
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content | default: "What would you like to say?" }}" style="resize: vertical"></textarea>
</label>

<input type="text" name="_gotcha" style="display:none" />

<button type='submit' class="button button-blue button-big mobile-block">{{ site.text.contact.submit | default: "Say Hello" }}</button>
</form>
{% else %}
<form action="https://formspree.io/{{ site.email }}" method="POST" class="form-stacked">
<label>
Email
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email | default: "Email Address" }}">
</label>
<label>
Content
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content | default: "What would you like to say?" }}" style="resize: vertical"></textarea>
</label>

<input type="hidden" name="_next" value="{{ site.baseurl }}/thanks/" />
<input type="hidden" name="_subject" value="{{ site.text.contact.subject | default: "New submission!" }}" />
<input type="text" name="_gotcha" style="display:none" />

<input type="submit" class="button button-blue button-big mobile-block" value="{{ site.text.contact.submit | default: "Say Hello" }}">
</form>
{% endif %}
</div>

{% if site.ajaxify_contact_form %}
{% include ajaxify_content_form.html %}
{% endif %}
34 changes: 34 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: default
---
{% assign posts_count = paginator.posts | size %}

<div class="home">
{% if posts_count > 0 %}
<div class="posts">
{% for post in paginator.posts %}
<div class="post py3">
<p class="post-meta">
{% if site.date_format %}
{{ post.date | date: site.date_format }}
{% else %}
{{ post.date | date: "%b %-d, %Y" }}
{% endif %}
</p>
<a href="{{ post.url | relative_url }}" class="post-link"><h3 class="h1 post-title">{{ post.title }}</h3></a>
<span class="post-summary">
{% if post.summary %}
{{ post.summary }}
{% else %}
{{ post.excerpt }}
{% endif %}
</span>
</div>
{% endfor %}
</div>

{% include pagination.html %}
{% else %}
<h1 class='center'>{{ site.text.index.coming_soon | default: "Coming soon..." }}</h1>
{% endif %}
</div>
16 changes: 15 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# appveyor.yml

environment:
RUBY_VERSION: 25
matrix:
- RUBY_VERSION: 24
JEKYLL_VERSION: "~> 3.5.2"
- RUBY_VERSION: 24
JEKYLL_VERSION: "~> 3.6.3"
- RUBY_VERSION: 25
JEKYLL_VERSION: "~> 3.6.3"
- RUBY_VERSION: 25
JEKYLL_VERSION: "~> 3.7.4"
- RUBY_VERSION: 26
JEKYLL_VERSION: "~> 3.7.4"
- RUBY_VERSION: 26
JEKYLL_VERSION: "~> 3.8"

platform:
- x64

install:
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
- bundle install
- gem install --no-document -v "%JEKYLL_VERSION%" jekyll

before_build:
- ruby -v
Expand All @@ -21,3 +34,4 @@ build_script:
- bundle exec jekyll build
- rake 'draft[Hello\, world]'
- rake undraft[hello-world.md]
- gem build pixyll.gemspec
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
43 changes: 1 addition & 42 deletions contact.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,6 @@
---
layout: page
layout: contact
title: Say Hello
permalink: /contact/
tags: contact
---

<div class="py2">
{% if site.ajaxify_contact_form %}
<form class="form-stacked">
<label>
Email
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email | default: "Email Address" }}">
</label>

<label>
Content
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content | default: "What would you like to say?" }}" style="resize: vertical"></textarea>
</label>

<input type="text" name="_gotcha" style="display:none" />

<button type='submit' class="button button-blue button-big mobile-block">{{ site.text.contact.submit | default: "Say Hello" }}</button>
</form>
{% else %}
<form action="https://formspree.io/{{ site.email }}" method="POST" class="form-stacked">
<label>
Email
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email | default: "Email Address" }}">
</label>
<label>
Content
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content | default: "What would you like to say?" }}" style="resize: vertical"></textarea>
</label>

<input type="hidden" name="_next" value="{{ site.baseurl }}/thanks/" />
<input type="hidden" name="_subject" value="{{ site.text.contact.subject | default: "New submission!" }}" />
<input type="text" name="_gotcha" style="display:none" />

<input type="submit" class="button button-blue button-big mobile-block" value="{{ site.text.contact.submit | default: "Say Hello" }}">
</form>
{% endif %}
</div>

{% if site.ajaxify_contact_form %}
{% include ajaxify_content_form.html %}
{% endif %}
33 changes: 1 addition & 32 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
---
layout: default
layout: home
---
{% assign posts_count = paginator.posts | size %}

<div class="home">
{% if posts_count > 0 %}
<div class="posts">
{% for post in paginator.posts %}
<div class="post py3">
<p class="post-meta">
{% if site.date_format %}
{{ post.date | date: site.date_format }}
{% else %}
{{ post.date | date: "%b %-d, %Y" }}
{% endif %}
</p>
<a href="{{ post.url | relative_url }}" class="post-link"><h3 class="h1 post-title">{{ post.title }}</h3></a>
<span class="post-summary">
{% if post.summary %}
{{ post.summary }}
{% else %}
{{ post.excerpt }}
{% endif %}
</span>
</div>
{% endfor %}
</div>

{% include pagination.html %}
{% else %}
<h1 class='center'>{{ site.text.index.coming_soon }}</h1>
{% endif %}
</div>
Loading

0 comments on commit 9c81b4b

Please sign in to comment.