Skip to content

Commit

Permalink
merge Jekyll gem changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanchandra committed Sep 17, 2017
1 parent 40c53b8 commit e2e7fad
Show file tree
Hide file tree
Showing 18 changed files with 89 additions and 62 deletions.
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
source "https://rubygems.org"
gem 'rouge'
gem 'jekyll'
gem 'jekyll-paginate'
gemspec
6 changes: 5 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ url: "https://rohanchandra.github.io/"
theme_settings:
# Meta
title: Type Theme
avatar: avatar.png
avatar: assets/img/avatar.png
gravatar: # Email MD5 hash
description: "A website with blog posts and pages" # used by search engines

Expand Down Expand Up @@ -76,3 +76,7 @@ sass:
sass_dir: _sass
style: :compressed
plugins: [jekyll-paginate]
theme: jekyll-theme-type
exclude:
- Gemfile
- Gemfile.lock
2 changes: 1 addition & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if site.theme_settings.katex %}
<script src="{{ "/js/katex_init.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/assets/js/katex_init.js" | prepend: site.baseurl }}"></script>
{% endif %}

{% if site.theme_settings.footer_text %}
Expand Down
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- CSS -->
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="stylesheet" href="{{ "/assets/css/main.css" | prepend: site.baseurl }}">

<!--Favicon-->
<link rel="shortcut icon" href="{{ "/favicon.ico" | prepend: site.baseurl }}" type="image/x-icon">
Expand Down
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</a>
{% elsif site.theme_settings.avatar %}
<a href="{{ site.baseurl }}/">
<img class="avatar" src="{{ site.baseurl }}/img/{{ site.theme_settings.avatar }}" alt=""/>
<img class="avatar" src="{{ site.baseurl }}/{{ site.theme_settings.avatar }}" alt=""/>
</a>
{% endif %}
<h1 class="site-title">
Expand Down
52 changes: 52 additions & 0 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: default
---

<div class="home">
{% if site.theme_settings.header_text %}
<div class="call-out"
style="background-image: url('{{ site.baseurl }}/{{ site.theme_settings.header_text_feature_image }}')">
{{ site.theme_settings.header_text }}
</div>
{% endif %}

<div class="posts">
{% for post in paginator.posts %}
<div class="post-teaser">
<header>
<h1>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
{{ post.title }}
</a>
</h1>
<p class="meta">
{{ post.date | date: "%B %-d, %Y" }}
</p>
</header>
<div class="excerpt">
{{ post.excerpt }}
<a class="button" href="{{ post.url | prepend: site.baseurl }}">
{{ site.theme_settings.str_continue_reading }}
</a>
</div>
</div>
{% endfor %}
</div>

{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
<i class="fa fa-chevron-left"></i>
{{ site.theme_settings.str_previous_page }}
</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
{{ site.theme_settings.str_next_page }}
<i class="fa fa-chevron-right"></i>
</a>
{% endif %}
</div>
{% endif %}
</div>
2 changes: 1 addition & 1 deletion _posts/2014-11-28-markdown-and-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Content Cell | Content Cell

Here's an example of an image, which is included using Markdown:

![Geometric pattern with fading gradient]({{ site.baseurl }}/img/sample_feature_img_2.png)
![Geometric pattern with fading gradient]({{ site.baseurl }}/assets/img/sample_feature_img_2.png)

Highlighting for code in Jekyll is done using Pygments or Rouge. This theme makes use of Rouge by default.

Expand Down
2 changes: 1 addition & 1 deletion _posts/2014-11-29-feature-images.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: Feature images
feature-img: "img/sample_feature_img.png"
feature-img: "assets/img/sample_feature_img.png"
---
This is an example of a post which includes a feature image specified in the front matter of the post. The feature image spans the full-width of the page, and is shown with the title on permalink pages.
2 changes: 0 additions & 2 deletions css/main.scss → _sass/type-theme.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
---
// External
@import 'external/reset';
@import 'external/syntax';
Expand Down
2 changes: 1 addition & 1 deletion about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: page
title: About
permalink: /about/
feature-img: "img/sample_feature_img_2.png"
feature-img: "assets/img/sample_feature_img_2.png"
---

Type Theme is a free and open-source theme for [Jekyll](http://jekyllrb.com/), licensed under the MIT License.
Expand Down
4 changes: 4 additions & 0 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
---

@import "type-theme";
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
51 changes: 1 addition & 50 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,52 +1,3 @@
---
layout: default
layout: home
---

<div class="home">
{% if site.theme_settings.header_text %}
<div class="call-out"
style="background-image: url('{{ site.baseurl }}/{{ site.theme_settings.header_text_feature_image }}')">
{{ site.theme_settings.header_text }}
</div>
{% endif %}

<div class="posts">
{% for post in paginator.posts %}
<div class="post-teaser">
<header>
<h1>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">
{{ post.title }}
</a>
</h1>
<p class="meta">
{{ post.date | date: "%B %-d, %Y" }}
</p>
</header>
<div class="excerpt">
{{ post.excerpt }}
<a class="button" href="{{ post.url | prepend: site.baseurl }}">
{{ site.theme_settings.str_continue_reading }}
</a>
</div>
</div>
{% endfor %}
</div>

{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
<i class="fa fa-chevron-left"></i>
{{ site.theme_settings.str_previous_page }}
</a>
{% endif %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="button" >
{{ site.theme_settings.str_next_page }}
<i class="fa fa-chevron-right"></i>
</a>
{% endif %}
</div>
{% endif %}
</div>
20 changes: 20 additions & 0 deletions jekyll-theme-type.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding: utf-8

Gem::Specification.new do |spec|
spec.name = "jekyll-theme-type"
spec.version = "1.0"
spec.authors = ["Rohan Chandra"]
spec.email = ["[email protected]"]

spec.summary = %q{A free and open-source Jekyll theme. Great for blogs and easy to customize.}
spec.homepage = "https://github.com/rohanchandra/type-theme"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|_sass|LICENSE|README)}i) }

spec.add_runtime_dependency "jekyll", "~> 3.4"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"

spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"
end

0 comments on commit e2e7fad

Please sign in to comment.