Skip to content

Instantly share code, notes, and snippets.

@inetbiz
Created October 1, 2021 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inetbiz/04320fb0f822623e9c5bf69cdb3de84b to your computer and use it in GitHub Desktop.
Save inetbiz/04320fb0f822623e9c5bf69cdb3de84b to your computer and use it in GitHub Desktop.
Jekyll Custom Plugin to Capitalize All Words in a String
require 'liquid'
require 'uri'
# Capitalize all words of the input
module Jekyll
module CapitalizeAll
def capitalize_all(words)
return words.split(' ').map(&:capitalize).join(' ')
end
end
end
Liquid::Template.register_filter(Jekyll::CapitalizeAll)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment