This file contains hidden or 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
require "bundler/setup" | |
require "fileutils" | |
require "date" | |
require "time" | |
## -- Misc Configs -- ## | |
source_dir = "src" # source file directory | |
comments_dir = "_data/comments/sub-folder-name" # comment directory | |
comment_label = "comment-" |
This file contains hidden or 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
# Description: Jekyll plugin to replace Markdown image syntax with {% picture %} tag for crafting responsive images | |
# place in /_plugins/ | |
Jekyll::Hooks.register :posts, :pre_render do |post, payload| | |
docExt = post.extname.tr('.', '') | |
# only process if we deal with a markdown file | |
if payload['site']['markdown_ext'].include? docExt | |
newContent = post.content.gsub(/\!\[(.+)\]\((.+)\)/, '{% picture default \2 alt="\1" %}') | |
post.content = newContent | |
end |
This file contains hidden or 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
{% capture the_collection %}{{ page.collection }}{% endcapture %} | |
{% if page.collection %} | |
{% assign document = site[the_collection] %} | |
{% endif %} | |
{% for links in document %} | |
{% if links.title == page.title %} | |
{% unless forloop.first %} | |
{% assign prevurl = prev.url %} |