Commit Graph

71 Commits

Author SHA1 Message Date
Parker Moore 6bd07501e8 Merge branch 'frontmatter-defaults' of git://github.com/maul-esel/jekyll into maul-esel-frontmatter-defaults
* 'frontmatter-defaults' of git://github.com/maul-esel/jekyll:
  move self.type to convertible
  oops, fix minor indentation quirk
  document frontmatter defaults precedence
  adjust frontmatter defaults precedence handling
  change cucumber feature to test for precedence too
  fix frontmatter defaults for custom paths
  more robust cucumber features
  fix slash handling for paths
  move cucumber features to own file
  fix minor docs quirk
  improve path checking, now using Pathname instead of regex
  Add site documentation for the new feature
  add inline code docs
  improve validation code
  fix for Ruby 1.8
  Add basic cucumber features for frontmatter defaults
  Retrieve frontmatter defaults when retrieved internally
  make frontmatter defaults available to liquid
  add a class `FrontmatterDefaults` for handling of frontmatter defaults
  Add a method to retrieve type to post, page and draft

Conflicts:
	lib/jekyll.rb
	lib/jekyll/convertible.rb
	lib/jekyll/core_ext.rb
	lib/jekyll/page.rb
	lib/jekyll/post.rb
2014-04-04 15:32:27 -04:00
nitoyon c56ce248c9 Move URL escape to Jekyll::URL 2014-03-21 16:59:25 +00:00
nitoyon e3e1c11509 Fix Page#url escape
Post#url wasn't escaped at all.

For example, when we have a page named 'a#b.html',
we expect its url to be 'a%23b.html',
but it was actually 'a#b.html'.

We now use Jekyll::URL.escape_path and Jekyll::URL.unescape_path.
2014-03-21 16:57:41 +00: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
Parker Moore 57d07469d3 Sanitize paths uniformly, in a Windows-friendly way.
Fixes kinda a #1948 thing.
Related to #1946.
2014-02-23 20:05:23 -05:00
Corey Ward f1c4e247a5 Remove unnecessary references to `self` 2014-02-21 16:27:21 -06:00
Parker Moore ab0ebadee3 Merge master into security-vuln-patches 2014-02-16 22:02:03 -05:00
Parker Moore 1176fc6f57 Give File.join the strings from the array 2014-02-08 00:38:59 -05:00
Parker Moore baabe7eb7e DRY up code, props @tamouse 2014-01-30 22:03:10 -05:00
Parker Moore 606c525099 Relative posts should never fail to build, even if @dir or @name is nil
Fixes https://github.com/jekyll/jekyll/issues/1963
2014-01-21 23:50:20 -05:00
Ben Balter e3be74e376 sanity check for pages permalink traversal
Signed-off-by: Parker Moore <parkrmoore@gmail.com>
2014-01-13 22:21:30 -08:00
Aidan Feldman 2bfafb3b33 make non-data properties/methods accessible to Liquid
per https://github.com/jekyll/jekyll/pull/1849/files#r8490593
2013-12-22 03:38:32 -05:00
maul.esel 960e01cba8 move self.type to convertible 2013-12-05 09:14:31 +01:00
maul.esel fb911af2cd Retrieve frontmatter defaults when retrieved internally
This is for example possible for layout defaults to take effect.
2013-09-11 00:57:18 +02:00
maul.esel 3ccd8dad31 Add a method to retrieve type to post, page and draft 2013-09-11 00:48:05 +02:00
Matt Rogers a9e2a74ea6 Merge pull request #1341 from maul-esel/minor-refactors
Minor refactors
2013-08-29 20:21:08 -07:00
Lucas Jenss a23e94ad48 Improve comment for url_placeholders method 2013-07-31 23:17:06 +02:00
Lucas Jenss cce58159ce Use symbols for all placeholders
See https://github.com/mojombo/jekyll/pull/944#discussion_r5443105
for a discussion.
2013-07-31 23:11:51 +02:00
Lucas Jenss f5d0be9660 Move URL generation to own class instead of a module
As suggested by @parkr in #944
2013-07-25 22:44:27 +02:00
maul.esel 6c6dd173c7 Post + Page: extract real path retrieval into separate method (@parkr) 2013-07-24 16:30:24 +02:00
maul.esel 75d6587d27 Move #to_liquid to Convertible 2013-07-22 16:34:01 +02:00
maul.esel 5d777eb9e9 With the move of path handling, Page#to_liquid can be simplified 2013-07-22 16:02:50 +02:00
maul.esel 08567b1091 move path handling in pages to the `path` method, as in posts 2013-07-22 16:02:50 +02:00
maul.esel f0e2468249 simplify some code with Hash#fetch 2013-07-22 16:02:42 +02:00
Lucas Jenss 2ac98a7358 Merge branch 'master' into permalink-special-characters
Conflicts:
	lib/jekyll/page.rb
	lib/jekyll/post.rb
2013-07-14 23:58:22 +02:00
Anand Narayan 5c47014c90 removed cgi unescape in page destination 2013-06-15 18:38:14 +05:30
Parker Moore d9f0dce67d make sure relative_permalinks is set to TRUE 2013-05-12 01:16:52 +02:00
Parker Moore 2e1316ec8b Ensure the page is in a subdir. That's the only time it's eff'd. 2013-05-12 01:08:33 +02:00
Parker Moore 0e82b4eb2f Use site config to determine whether permalinks should be relative. 2013-05-11 18:26:20 +02:00
Parker Moore 1f23bc4dc0 Add support for relative permalinks 2013-05-11 18:03:03 +02:00
Parker Moore b355ef6469 Add jekyll doctor command 2013-05-11 17:49:20 +02:00
Parker Moore e22b1bb74a Add deprecation support for pages in subfolders with relative permalinks. 2013-05-11 17:40:00 +02:00
maul.esel d73841c961 always ADD a leading slash to page.url or post.url 2013-04-20 13:15:40 +02:00
maul.esel c6df2e150a remove leading slash from page.url and post.url 2013-04-19 16:37:48 +02:00
Parker Moore 6ed41e373c Remove code duplication: #write in Page and Post is the same. 2013-04-16 02:55:31 +02:00
Parker Moore e7546a98f6 Remove unnecessary override of #read_yaml in Page. 2013-04-15 19:24:23 +02:00
maul.esel b7064a4bc3 remove 'post' and 'page' default layouts 2013-04-15 17:24:09 +02:00
maul.esel 968f3b0911 allow overriding page.path in YAML frontmatter 2013-04-13 00:05:49 +02:00
maul.esel d64fd1e8fe expose file path relative to source dir to liquid
Fixes #633.
2013-04-12 17:37:16 +02:00
Lucas Jenss cfcbe1f830 Refactor URL processing/generation into separate module
This is done to prepare for improved permalink generation
for URLs containing special characters, as proposed in
issue #782
2013-04-09 23:53:46 +02:00
Parker Moore 725b127f9b Merge pull request #536 from fotos/fix_page_dir
Added path in url.
2013-03-09 17:07:16 -08:00
Fotos Georgiadis f79662719b Fix indentation. 2013-03-09 15:07:27 +02:00
Fotos Georgiadis 441eddf1ca Fix pretty url style paths.
Ignore the basename if the page is an index page, preserve it if it's just an
html page and use the full path in every other case.
2013-02-28 03:49:39 +02:00
Tom Bell 517e6f81d3 Remove new lines between module and class 2013-01-20 00:00:49 +00:00
Parker Moore 5a3e05dbff Ensuring that layout is only set to the default value if layout is not specified 2013-01-12 15:31:14 -08:00
7rans e8c74fe7a8 Layouts default to page or post depending upon type. 2013-01-12 13:49:45 -08:00
Fotos Georgiadis 4090500c5a Added path in url.
Page#dir was returning the wrong dir ('/') for pages in directories.
2012-04-09 03:08:41 +03:00
Lee Jarvis 6a756881f9 clean up some warnings 2011-06-03 23:38:39 +01:00
Tom Preston-Werner a428acec1c TomDoc some things. 2011-05-08 14:49:19 -07:00