Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@maul-esel's frontmatter defaults work, rebased #2205

Merged
merged 26 commits into from
Apr 22, 2014

Conversation

parkr
Copy link
Member

@parkr parkr commented Apr 4, 2014

Rebased version of #1527.

/cc @maul-esel

maul.esel and others added 24 commits September 11, 2013 00:48
This is for example possible for layout defaults to take effect.
The Page#path or Post#path can be overriden by by a frontmatter
setting. This causes path-based frontmatter default detection to
fail. Add test to demonstrate this and fix it.
Before, the bottom-most default set had highest precedence. Instead,
now the set with a longer i.e. more specific path has precedence and
sets with a type setting have precedence over those without one. In
case of equal precedence the bottom-most still wins.
…yll 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
@parkr parkr added this to the 2.0 milestone Apr 4, 2014
@parkr parkr added the Feature label Apr 4, 2014
@mattr-
Copy link
Member

mattr- commented Apr 15, 2014

The tests are failing because - and this is just a guess - we stopped allowing page.name to be overridden. Should we just take those conditions out of the current failing cucumber scenario and write another that indicates we don't allow page.name to be overridden?

Use `page.description` in the cucumber feature instead. `page.name`
isn't overridable anymore.
@mattr-
Copy link
Member

mattr- commented Apr 16, 2014

I've updated the cucumber scenarios to not use page.name and to use page.description instead. This should make them pass at least. Not sure if the best way to handle the inability to override page.name is with documentation or some other way.

@mattr- mattr- assigned parkr and unassigned mattr- Apr 16, 2014
@parkr
Copy link
Member Author

parkr commented Apr 16, 2014

Thank you!! Given that page.name is super special (basename - extname), I think it's totally fine if we don't allow it to be overridden. Just my 2️⃣ 💰 tho.

@parkr parkr merged commit 9db5a1a into master Apr 22, 2014
@parkr parkr deleted the maul-esel-frontmatter-defaults branch April 22, 2014 03:01
parkr added a commit that referenced this pull request Apr 22, 2014
cben added a commit to cben/sandbox that referenced this pull request Apr 30, 2014
jekyll/jekyll#2205
probably not in github pages yet?
@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants