Commit Graph

20 Commits

Author SHA1 Message Date
Parker Moore b6c283a4ae wip: allow custom extensions 2016-01-04 17:42:06 -08:00
Parker Moore cb5bc1093e utils: has_yaml_header? should accept files with extraneous spaces
Occasionally, extra spaces at the end of the YAML front matter prologue are
saved to a file and it goes missing without telling the user why. This
should simply accept those changes without any detriment to the user,
allowing anyone to add as many spaces as they like to the end of their
front matter prologues.
2016-01-04 14:09:30 -08:00
Parker Moore 5bf596b239 utils/drops: update Drop to support Utils.deep_merge_hashes
Fixes #4287
2015-12-27 08:06:37 -05:00
Pat Hawks 69a6323599 Utils.deep_merge_hashes failing test 2015-12-27 07:48:45 -05:00
Parker Moore b90f8e048a Merge pull request #4150 from ducktyper/master
Merge pull request 4150
2015-11-30 19:57:01 -08:00
ducksan cho e9f8b4df74 Add Windows support to Utils.safe_glob 2015-11-19 17:15:51 +13:00
Ducksan Cho a168edae45 Add Utils.safe_glob method
which works the same way as Dir.glob but seperating the input
into two parts ('dir' + '/' + 'pattern') to make sure
the first part('dir') does not act as a pattern.
2015-11-19 00:46:46 +13:00
rebornix 6a98ab2a15 Make `:title` cased for backwards compability and add `:slug` for uncased usage. 2015-11-18 10:43:13 +08:00
Will Norris 0d1586a5c4 Improved permalinks for pages and collections
This updates the default permalink style for pages and collections to
match the site-wide 'permalink' setting.  If the permalink setting
contains a trailing slash, either explicitly or by being set to
':pretty', then pages and collections permalinks will contain trailing
slashes by default as well.  Similarly, if the permalink setting
contains a trailing ':output_ext', so will pages and collections.  If
the permalink setting contains neither a trailing slash or extension,
neither will pages or collections.

This impacts only the default permalink structure for pages and
collections.  Permalinks set in the frontmatter of an individual page
take precedence, as does the permalink setting for a specific
collection.

Fixes #2691
2015-03-04 09:38:23 -08:00
Parker Moore 7ad0597bff Make our own Minitest::Test subclass for further subclassing 2015-02-21 00:33:47 -08:00
Parker Moore 4b59eb4175 Fix the test inheritance for the tests. 2015-02-20 13:35:02 -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
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
nitoyon 3c5e9f5334 Add tests for mode parameters of slugify Liquid filter 2014-10-12 02:50:08 +09:00
Chris Frederick 62a3961739 Add tests for Utils#slugify 2014-09-02 14:33:03 +09:00
Alfred Xing c7f8c70935 Add tests for `Utils.parse_date` method 2014-08-02 15:03:31 -07: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
Parker Moore 4de2be8c5f Add Jekyll::LiquidExtensions.lookup_variable
To use, just include `Jekyll::LiquidExtensions` as you please:

```ruby
class SayHi < Liquid::Tag
  include Jekyll::LiquidExtensions

  def initialize(tag_name, markup, tokens)
    @markup = markup.strip
  end

  def render(context)
    "hi #{lookup_variable(context, @markup)}"
  end
end
```

Fixes #2071.
2014-04-22 14:27:47 -04:00
Parker Moore 7787d64bce Rename those Utils functions. 2014-03-04 15:52:05 -05:00
Parker Moore e2af1b547b Extract core extensions into a Utils module
Fixes #2111
2014-03-03 22:13:03 -05:00