Skip to content

Commit

Permalink
feat(jekyll): compatible with latest jekyll
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Now AMSF is updated with latest version of Jekyll, with native theme support.

So the  in AMSF is now conflicted with Jekyll's theme directive. I have to rename it to  in order to compatible with built-in theme feature.
  • Loading branch information
sparanoid committed Oct 8, 2016
1 parent d54c8dd commit 3e7421c
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

group :development do
gem 'jekyll', '3.1.6'
gem 'jekyll', '3.3.0'
gem 'jekyll-last-modified-at'
gem 'stringex'
end
24 changes: 15 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,42 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
colorator (0.1)
ffi (1.9.10)
jekyll (3.1.6)
colorator (~> 0.1)
addressable (2.4.0)
colorator (1.1.0)
ffi (1.9.14)
forwardable-extended (2.6.0)
jekyll (3.3.0)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-last-modified-at (0.3.4)
jekyll
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-watch (1.4.0)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.11.1)
kramdown (1.12.0)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rouge (1.11.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.22)
stringex (2.6.0)
stringex (2.6.1)

PLATFORMS
ruby

DEPENDENCIES
jekyll (= 3.1.6)
jekyll (= 3.3.0)
jekyll-last-modified-at
stringex

Expand Down
6 changes: 3 additions & 3 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = (grunt) ->
theme:
branch: "master"
assets: "<%= amsf.user.assets %>/themes/<%= amsf.theme.current %>"
current: "<%= config.amsf.theme %>"
current: "<%= config.amsf.amsf_theme %>"
new_name: grunt.option("theme") or "<%= amsf.theme.current %>"
new_author: grunt.option("user") or "amsf"

Expand Down Expand Up @@ -490,7 +490,7 @@ module.exports = (grunt) ->
cleanempty:
options:
files: false

dist:
src: ["<%= config.dist %>/**/*"]

Expand All @@ -500,7 +500,7 @@ module.exports = (grunt) ->
dest: "_amsf.yml"
replacements: [
{
from: /(theme: +)(.+)/g
from: /(amsf_theme: +)(.+)/g
to: "$1<%= amsf.theme.new_name %>"
}
]
Expand Down
2 changes: 1 addition & 1 deletion _amsf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
version: 0.1.12

# Current theme
theme: curtana
amsf_theme: curtana
4 changes: 2 additions & 2 deletions _app/_includes/_amsf.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
{% comment %}
Theme base URL
{% endcomment %}
{% capture amsf_theme_base %}{{ site.theme | prepend: '/themes/' }}{% endcapture %}
{% capture amsf_theme_base %}{{ site.amsf_theme | prepend: '/themes/' }}{% endcapture %}

{% comment %}
Theme assets base URL
{% endcomment %}
{% capture amsf_theme_assets %}{{ site.theme | prepend: '/themes/' | prepend: site.assets | prepend: site.base }}{% endcapture %}
{% capture amsf_theme_assets %}{{ site.amsf_theme | prepend: '/themes/' | prepend: site.assets | prepend: site.base }}{% endcapture %}

{% comment %}
User assets base URL
Expand Down
10 changes: 5 additions & 5 deletions _app/_pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,27 @@ <h2>Super-fast Jekyll framework</h2>
<div class="page-content">
<h2>Getting Started</h2>
{% for post in site.tags.getting-started %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}

<h2>Customization</h2>
{% for post in site.tags.customization %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}

<h2>Theme Curtana</h2>
{% for post in site.tags.curtana %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}

<h2>Deployment</h2>
{% for post in site.tags.deployment %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}

<h2>Miscellaneous</h2>
{% for post in site.tags.miscellaneous %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}
</div>
</article>
2 changes: 1 addition & 1 deletion _app/_pages/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
---

{% for post in site.categories.news %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}
2 changes: 1 addition & 1 deletion _app/_pages/themes/curtana/example-news.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
---

{% for post in site.categories.news %}
{% include themes/{{ site.theme }}/includes/page-item.html %}
{% include themes/{{ site.amsf_theme }}/includes/page-item.html %}
{% endfor %}

0 comments on commit 3e7421c

Please sign in to comment.