Commit Graph

72 Commits

Author SHA1 Message Date
Parker Moore aaf0ba15cc Use frozen regular expressions for Utils#slugify 2015-01-17 16:25:33 -08:00
Parker Moore 10659e1eef Merge branch 'nitoyon-slugify-new-param'
* nitoyon-slugify-new-param:
  Remove superfluous Sass declarations.
  Move the slugify options out to their own section so as to fix the formatting.
  Document the mode parameter of slugify Liquid filter
  Add tests for mode parameters of slugify Liquid filter
  Add mode parameter to slugify Liquid filter

Conflicts:
	lib/jekyll/utils.rb

        ---> Hadn't added UTF-8 support in nitoyon's PR.
2015-01-17 16:06:10 -08:00
Parker Moore a098dc80cd Merge pull request #3234 from jekyll/ruby-2-2 2014-12-29 20:49:04 -05:00
Parker Moore 7bcf8d689e Always call Time#localtime to translate to TZ'd time. 2014-12-29 20:12:35 -05:00
Renaud Martinet f9e249ae20 Generalize Utils#slugify for any scripts
It replaces any non alphanumeric glyphs by an hyphen.
2014-10-31 15:56:03 +01:00
Parker Moore 7fd9f102c0 Merge pull request #2997 from jekyll/utils-slugify 2014-10-20 20:11:04 -07:00
Glauco Custódio 68c0e8f847 Hash#each_key instead of Hash#keys.each. Faster code. 2014-10-20 10:10:29 -02:00
Parker Moore 9f5835871b Utils.slugify: Don't create new objects when gsubbing 2014-10-12 16:18:40 -07:00
nitoyon 46e76bde3f Add mode parameter to slugify Liquid filter 2014-10-12 02:44:58 +09:00
Chris Frederick 4adc35aaf3 Revise Utils#slugify with inspiration from Rails 2014-09-02 14:32:14 +09:00
Chris Frederick 702b39dec5 Replace the 'name' parameter with 'string' 2014-09-02 13:34:44 +09:00
Chris Frederick 3ca1245027 Move Document#sluggify to Utils#slugify 2014-09-02 13:29:28 +09:00
Parker Moore f16a5cbae1 Add Utils.has_yaml_header? so we can check the front matter existence in one place 2014-08-12 15:58:02 -04:00
Alfred Xing 4cfbdb07bb Show input in error message
Show date input in error message to make it easier for user
to find infringing date/file
2014-08-02 11:51:04 -07:00
Alfred Xing d5322a73bf Move instances of `Time.parse` into a Utils method 2014-08-02 09:38:50 -07:00
Alfred Xing 6d62dbbafc Replace deprecated Ruby methods
Replace `Hash#has_key?` and `File.exists?` with `Hash#key?`
and `File.exist?`
2014-07-31 12:50:20 -07:00
Terry Schmidt c76e41d157 Update `Utils#pluralized_array_from_hash` and `Utils#value_from_singular_key` per suggestion from @parkr
Switched to using the `#tap` method for more concise code. Also returning the value from
`value_from_singular_key` instead of returning an array wrapped presentation of the value.
This allows for a one-liner in `pluralized_array_from_hash`.
2014-05-20 12:32:59 -05:00
Terry Schmidt 0371b69952 Set categor[y|ies] on post if they appear in site frontmatter defaults 2014-05-09 13:34:13 -05:00
John Piasetzki 3e6a6ffb52 Update util functions
Cribbed from http://api.rubyonrails.org/classes/Hash.html#method-i-symbolize_keys
2014-04-28 02:06:41 -04:00
Parker Moore 7787d64bce Rename those Utils functions. 2014-03-04 15:52:05 -05:00
Parker Moore 5e8643d855 Add Utils.stringify_hash_keys 2014-03-04 15:44:53 -05:00
Parker Moore e2af1b547b Extract core extensions into a Utils module
Fixes #2111
2014-03-03 22:13:03 -05:00