-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…: teste de plugin local
- Loading branch information
Showing
5 changed files
with
36 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,12 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "github-pages", group: :jekyll_plugins | ||
# gem "github-pages", group: :jekyll_plugins | ||
# gem "jekyll", "~> 3.9" | ||
|
||
gem "jekyll", "~> 3.9" | ||
|
||
group :jekyll_plugins do | ||
gem 'jekyll-feed' | ||
gem 'jekyll-seo-tag' | ||
gem 'kramdown-parser-gfm' | ||
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
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,20 @@ | ||
# @see https://learn.cloudcannon.com/jekyll/using-jekyll-plugins/ | ||
|
||
# Outputs the reading time | ||
|
||
# Read this in “about 4 minutes” | ||
# Put into your _plugins dir in your Jekyll site | ||
# Usage: Read this in about {{ page.content | reading_time }} | ||
|
||
module ReadingTimeFilter | ||
def reading_time( input ) | ||
words_per_minute = 180 | ||
|
||
words = input.split.size; | ||
minutes = ( words / words_per_minute ).floor | ||
minutes_label = minutes === 1 ? " minute" : " minutes" | ||
minutes > 0 ? "about #{minutes} #{minutes_label}" : "less than 1 minute" | ||
end | ||
end | ||
|
||
Liquid::Template.register_filter(ReadingTimeFilter) |