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

Try to load _config.yaml if _config.yml is nonexistent. #2406

Merged
merged 1 commit into from
May 20, 2014

Conversation

yihangho
Copy link
Contributor

Fix #2375.

Jekyll.logger.warn "Configuration file:", "none"
{}
if file.end_with?('yml')
read_config_file(file.sub(/yml$/, 'yaml'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just do a check for existence instead of doing this? I'd rather do this above, on line 126.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought that it would be nice if all the logic dealing with file existence and the like in one method.

Anyway, if we do the checking on line 126, I assume the default when both _config.yml and _config.yaml exist is still _config.yml, and let read_config_file takes care of the warning message?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say if they both exist, then yes, _config.yml should take precedence.

@parkr
Copy link
Member

parkr commented May 20, 2014

Sweet, LGTM.

parkr added a commit that referenced this pull request May 20, 2014
@parkr parkr merged commit 54fba9a into jekyll:master May 20, 2014
parkr added a commit that referenced this pull request May 20, 2014
@yihangho yihangho deleted the config-yaml branch May 20, 2014 04:31
@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.

config.yaml does not work (must be config.yml)
3 participants