Skip to content

Commit 304e030

Browse files
committed
Migrate to Jekyll 4.4.*
1 parent 4c7af64 commit 304e030

File tree

5 files changed

+51
-15
lines changed

5 files changed

+51
-15
lines changed

.github/workflows/jekyll.yml renamed to .github/workflows/build-chulapa-gh-pages.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# separate terms of service, privacy policy, and support
44
# documentation.
55

6-
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7-
name: Deploy Jekyll site to Pages
6+
# Based on https://github.com/actions/starter-workflows/blob/main/pages/jekyll.yml
7+
name: Deploy Chulapa Jekyll site to Pages
88

99
on:
1010
# Runs on pushes targeting the default branch
@@ -32,25 +32,34 @@ jobs:
3232
runs-on: ubuntu-latest
3333
env:
3434
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
35-
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to work out-of-the-box with jekyll-github-metadata
3636
steps:
3737
- name: Checkout
3838
uses: actions/checkout@v4
3939
- name: Setup Ruby
40+
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
4041
uses: ruby/setup-ruby@v1
4142
with:
42-
ruby-version: '3.1'
43-
bundler-cache: true #
44-
cache-version: 9999
43+
ruby-version: '3.1' # Not needed with a .ruby-version file
44+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
45+
cache-version: 1 # Increment this number if you need to re-download cached gems
46+
working-directory: '.' # Default directory of the site, change it to 'docs' if the site is hosted in (e.g.) 'docs' folder
4547
- name: Setup Pages
4648
id: pages
4749
uses: actions/configure-pages@v5
4850
- name: Build with Jekyll
49-
run: bundle exec jekyll build --incremental --baseurl "${{ steps.pages.outputs.base_path }}"
51+
# Outputs to the './_site' directory by default
52+
run: |
53+
cd . # Change it to 'docs' if the site is hosted in (e.g.) 'docs' folder
54+
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
55+
shell: bash
5056
env:
5157
JEKYLL_ENV: production
5258
- name: Upload artifact
59+
# Automatically uploads an artifact from the './_site' directory by default
5360
uses: actions/upload-pages-artifact@v3
61+
with:
62+
path: _site/ # Change it to 'docs/_site/' if the site is hosted in (e.g.) 'docs' folder
5463

5564
# Deployment job
5665
deploy:
@@ -62,4 +71,4 @@ jobs:
6271
steps:
6372
- name: Deploy to GitHub Pages
6473
id: deployment
65-
uses: actions/deploy-pages@v4
74+
uses: actions/deploy-pages@v4

Gemfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
source 'https://rubygems.org'
2-
3-
gem "jekyll", "=3.9.3"
4-
gem 'jekyll-redirect-from'
5-
gem 'github-pages', group: :jekyll_plugins
6-
gem 'tzinfo-data'
2+
gem "jekyll", "~> 4.4.1"
73

84
group :jekyll_plugins do
95
gem 'jekyll-algolia', '~> 1.0'
@@ -12,4 +8,14 @@ group :jekyll_plugins do
128
gem 'jekyll-include-cache'
139
end
1410

15-
gem "webrick", "~> 1.8"
11+
# Hard dependencies
12+
gem 'jekyll-paginate'
13+
gem 'jekyll-remote-theme'
14+
gem 'kramdown-parser-gfm'
15+
16+
# Additional dependencies
17+
gem 'faraday-retry'
18+
gem "wdm", "~> 0.1.0" if Gem.win_platform?
19+
gem "webrick"
20+
gem 'tzinfo-data'
21+
gem 'jekyll-redirect-from'

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github: [metadata]
2+
13
remote_theme: dieghernan/chulapa
24

35
repository: dieghernan/dieghernan.github.io
@@ -205,6 +207,8 @@ plugins:
205207
- jekyll-include-cache
206208
- jekyll-sitemap
207209
- jekyll-redirect-from
210+
- jekyll-remote-theme
211+
208212

209213

210214
# Exclude these files from production site
@@ -244,3 +248,5 @@ kramdown:
244248
sass:
245249
sass_dir: _sass
246250
style: compressed # https://sass-lang.com/documentation/file.SASS_REFERENCE.html#output_style
251+
quiet_deps: true
252+

_pages/tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: cloudtag
2+
layout: cloudtag2
33
title: Tags
44
permalink: /tags
55
excerpt: Tags on this theme

_plugins/grouptag.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module Jekyll
2+
module TagFilters
3+
def count_by_item(input)
4+
input = input.is_a?(String) ? input.split(',') : input
5+
counts = Hash.new(0)
6+
input.flatten.each do |name|
7+
name = name.strip
8+
counts[name] += 1
9+
end
10+
sorted_counts = counts.sort_by { |tag, count| -count }
11+
sorted_counts.to_h
12+
end
13+
end
14+
end
15+
Liquid::Template.register_filter(Jekyll::TagFilters)

0 commit comments

Comments
 (0)