Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jekyll 4, jekyll-pagination-v2, gem theme #56

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
_site
.sass-cache
.jekyll-metadata
.jekyll-cache
.bundle
vendor
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.4"
gem "jekyll", "~> 4.0.0"

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-paginate-v2"
gem "jekyll-sitemap"
gem "octopress-autoprefixer"
end
Expand Down
84 changes: 46 additions & 38 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,76 +1,84 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
autoprefixer-rails (9.4.8)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
autoprefixer-rails (9.7.6)
execjs
colorator (1.1.0)
concurrent-ruby (1.1.4)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
execjs (2.7.0)
ffi (1.10.0)
ffi (1.12.2)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jekyll (3.8.5)
jekyll (4.0.1)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-watch (2.1.2)
terminal-table (~> 1.8)
jekyll-paginate-v2 (3.0.0)
jekyll (>= 3.0, < 5.0)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
kramdown (2.2.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
octopress-autoprefixer (2.0.1)
octopress-autoprefixer (1.0.2)
autoprefixer-rails
jekyll (~> 3.0)
jekyll (>= 2.0)
octopress-hooks (~> 2.0)
octopress-hooks (2.6.2)
jekyll (>= 2.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
public_suffix (4.0.5)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
rexml (3.2.4)
rouge (3.19.0)
safe_yaml (1.0.5)
sass (3.7.3)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.3.0)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)

PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 3.8.4)
jekyll-paginate
jekyll (~> 4.0.0)
jekyll-paginate-v2
jekyll-sitemap
octopress-autoprefixer
tzinfo-data

BUNDLED WITH
1.16.1
2.1.2
31 changes: 26 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ default_img:
name:
profile_img:
profile:
social:
github:
# social:
# github:

# formats
date_format: "%b %-d, %Y"

# Build settings
markdown: kramdown
plugins:
- jekyll-paginate
- jekyll-paginate-v2
- jekyll-sitemap
- octopress-autoprefixer
compress_html:
Expand All @@ -36,8 +39,26 @@ exclude:
- README.md

# Pagination
paginate: 5
paginate_path: "/blog/page-:num"
pagination:
enabled: true
per_page: 5
permalink: "/blog/page-:num"
sort_field: 'date'
sort_reverse: true

autopages:
enabled: true
categories:
layouts:
- 'category_index.html'
# Optional, the title that each category paginate page should get (:cat is replaced by the Category name)
title: ':cat'
# Optional, the permalink for the pagination page (:cat is replaced),
# the pagination permalink path is then appended to this permalink structure
permalink: '/category/:cat'
slugify:
mode: 'default' # :cat is slugified. Modes: default, raw, pretty, ascii, latin
case: false # Whether to replace all uppercase letters with their lowercase counterparts

# Sass
sass:
Expand Down
12 changes: 12 additions & 0 deletions _data/language.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
archive: "Archive"
viewall: "View All"
posts: "Posts"
backto_cat: "Back to"
category: "Category"
categories: "Categories"
readmore: "Read More"
readnext: "Read Next"
postedin_cat: "Posted in"
pagination:
previous: "Previous"
next: "Next"
2 changes: 1 addition & 1 deletion _includes/archive-link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<footer class="section-padding--sm footer">
<a class="footer__archive" href="{{ site.baseurl }}/archive/">Archive</a>
<a class="footer__archive" href="{% link archive.html %}">{{ site.data.language.archive }}</a>
<ul class="footer__social">
<li><a class="fa fa-lg fa-envelope-o" href="mailto:{{ site.email }}"></a></li>
{% for social in site.social %}
Expand Down
4 changes: 2 additions & 2 deletions _includes/categories-tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
{% endfor %}
<div class="card__container">
<h2 class="card__header">{{ category }}</h2>
<p class="card__count">{{ site.categories[category] | size }} Posts</p>
<span class="card__more">View All</span>
<p class="card__count">{{ site.categories[category] | size }} {{ site.data.language.posts }}</p>
<span class="card__more">{{ site.data.language.viewall }}</span>
</div>
</a>
</li>
Expand Down
1 change: 1 addition & 0 deletions _includes/custom-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% comment %}Add your own scripts and styles here.{% endcomment %}
1 change: 1 addition & 0 deletions _includes/custom-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% comment %}Add your own scripts and styles here.{% endcomment %}
2 changes: 2 additions & 0 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/rellax/1.0.0/rellax.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js"></script>
<script type="text/javascript" src="{{ '/assets/js/app.js' | prepend: site.baseurl }}"></script>

{% include custom-footer.html %}
2 changes: 2 additions & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@
ga('send', 'pageview');
</script>
{% endif %}

{% include custom-head.html %}
</head>
18 changes: 18 additions & 0 deletions _includes/profile-card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="profile__card">
<div class="profile__img">
<figure class="absolute-bg" style="background-image: url('{{ site.profile_img }}');"></figure>
</div>
<div class="profile__container">
<p>{{ site.profile }}</p>
{% if site.email or site.social %}
<ul class="profile__social">
{% if site.email %}
<li><a class="fa fa-lg fa-envelope-o" href="mailto:{{ site.email }}"></a></li>
{% endif %}
{% for social in site.social %}
<li><a class="fa fa-lg fa-{{ social[0] }}" href="{{ social[1] }}" target="_blank"></a></li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
10 changes: 5 additions & 5 deletions _layouts/category_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<div>
<a class="nav nav--white" href="{{ site.baseurl }}/">
<i class="fa fa-lg fa-arrow-left"></i>
<span>Back to Posts</span>
<span>{{ site.data.language.backto_cat }} {{ site.data.language.posts }}</span>
</a>
{% for post in site.categories[page.title] %}
<figure class="absolute-bg preview__img" style="background-image: url('{{ post.image }}');"></figure>
{% endfor %}
<div class="previews__container">
<span>Category</span>
<span>{{ site.data.language.category }}</span>
<h1>{{ page.title }}</h1>
</div>
</div>
Expand All @@ -20,7 +20,7 @@ <h1>{{ page.title }}</h1>
<header>
<ul class="tabs">
<li class="tabs__item">{{ page.title }}</li>
<li class="tabs__item">Categories</li>
<li class="tabs__item">{{ site.data.language.categories }}</li>
</ul>
</header>

Expand All @@ -31,10 +31,10 @@ <h1>{{ page.title }}</h1>

<li class="preview" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<a class="preview__link" href="{{ post.url | prepend: site.baseurl }}" itemprop="url">
<span class="preview__date" itemprop="datePublished" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%b %-d, %Y" }}</span>
<span class="preview__date" itemprop="datePublished" datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: site.date_format }}</span>
<h2 class="preview__header" itemprop="name">{{ post.title }}</h2>
<p class="preview__excerpt" itemprop="description">{{ post.content | strip_html | truncatewords: 30 }}</p>
<span class="preview__more">Read More</span>
<span class="preview__more">{{ site.data.language.readmore }}</span>
</a>
</li>

Expand Down
8 changes: 7 additions & 1 deletion _layouts/compress.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---
# Jekyll layout that compresses HTML
# v3.1.0
# http://jch.penibelst.de/
# © 2014–2015 Anatol Broder
# MIT License
---

{% capture _LINE_FEED %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% assign _lastchar = _pres.last | split: "" | last %}{% assign _outerloop = forloop %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if forloop.last and _lastchar == _LINE_FEED %}{% unless _outerloop.last %}{{ _LINE_FEED }}{% endunless %}{% continue %}{% endif %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment or site.compress_html.ignore.envs == "all" %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
Loading