-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Ruby to 3.3 and Jekyll to 4.3
Jekyll comes with the jekyll-sass-converter plugin, so most of the work in this commit is switching to that gem, which expects an _sass directory by default. Also, that gem does not support sprockets, so we need to do some manual handling of the various sass gems to include their stylesheets and other assets (fonts) in the proper directories. Fixes #878
- Loading branch information
Showing
37 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
require "font-awesome-sass" | ||
|
||
class FontGenerator < Jekyll::Generator | ||
def generate(site) | ||
@site = site | ||
@site.static_files.concat(font_files) | ||
end | ||
|
||
def font_files | ||
assets_path = FontAwesome::Sass.assets_path | ||
source = FontAwesome::Sass.gem_path | ||
Dir.glob(File.join(assets_path, "fonts/font-awesome/*")).map do |font| | ||
font = font.sub(assets_path, "assets") | ||
dir = File.dirname(font) | ||
file_name = File.basename(font) | ||
Jekyll::StaticFile.new(@site, source, dir, file_name) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require "jekyll/converters/scss" | ||
require "bootstrap-sass" | ||
require "font-awesome-sass" | ||
|
||
# sass/load_paths configuration in _config.yml only supports hardcoded paths, | ||
# so we override to add in the paths from the gems dynamically. | ||
module SassLoader | ||
def user_sass_load_paths | ||
super + [ | ||
Bootstrap.stylesheets_path, | ||
FontAwesome::Sass.stylesheets_path | ||
] | ||
end | ||
end | ||
|
||
Jekyll::Converters::Scss.prepend(SassLoader) |
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters