Search Front matter defaults with relative_path (#7261)
Merge pull request 7261
This commit is contained in:
		
							parent
							
								
									922e4c01fe
								
							
						
					
					
						commit
						1df4e94989
					
				|  | @ -50,7 +50,7 @@ module Jekyll | |||
|       read_yaml(File.join(base, dir), name) | ||||
| 
 | ||||
|       data.default_proc = proc do |_, key| | ||||
|         site.frontmatter_defaults.find(File.join(dir, name), type, key) | ||||
|         site.frontmatter_defaults.find(relative_path, type, key) | ||||
|       end | ||||
| 
 | ||||
|       Jekyll::Hooks.trigger :pages, :post_init, self | ||||
|  | @ -144,7 +144,7 @@ module Jekyll | |||
| 
 | ||||
|     # The path to the page source file, relative to the site source | ||||
|     def relative_path | ||||
|       File.join(*[@dir, @name].map(&:to_s).reject(&:empty?)).sub(%r!\A\/!, "") | ||||
|       @relative_path ||= File.join(*[@dir, @name].map(&:to_s).reject(&:empty?)).sub(%r!\A\/!, "") | ||||
|     end | ||||
| 
 | ||||
|     # Obtain destination path. | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue