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

Read config from _config.yml when present #175

Closed
benbalter opened this issue Feb 14, 2015 · 9 comments
Closed

Read config from _config.yml when present #175

benbalter opened this issue Feb 14, 2015 · 9 comments

Comments

@benbalter
Copy link
Contributor

I taught my Rakefile to read the html_proofer property of my _config.yml file.

Would be awesome to support that automatically, if a _config.yml file is present.

@doktorbro
Copy link

What do you think about that?

# _proofer.yml
verbose: true
typhoeus:
  ssl_verifyhost: 2
# Rakefile
HTML::Proofer.new("./_site", :config => '_proofer.yml').run

The default for the config could be _proofer.yml.

@gjtorikian
Copy link
Owner

I do very much like the idea of making this generic as @penibelst suggests. What if it reads from :config if provided, or a :config_key in a :config if that's provided? For example, in addition to the above, it could also be:

HTML::Proofer.new("./_site", :config => '_config.yml', :config_key => 'proofer' ).run
# _config.yaml
baseurl: ''
proofer:
 - verbose: true
 - typhoeus:
   ssl_verifyhost: 2

Not sure if that's overly complicated. I'm not often a fan of introducing a new top-level file in projects (_proofer.yml) for people that do not like them.

@doktorbro
Copy link

Not sure if that's overly complicated.

I think it is. We should not motivate people to pollute foreign configuration files.

@gjtorikian
Copy link
Owner

Fair enough, fair enough. I think a _proofer.yml is fine.

@nschonni
Copy link
Contributor

_proofer.yml might be too generic, the filename should include "html" like .htmlproofer.yml

@doktorbro
Copy link

@nschonni I agree. And I like the dot at start.

We could make the config feature only available for the binary.

htmlproof --config .myproofer.yml

The default config should have the same name as the binary .htmlproof.yml.

@episource
Copy link

In case this refers to jekyll: I created a minimalistic jekyll plugin wrapping html-proofer. The plugin can be configured using jekyll's _config.yml.

@FelicianoTech
Copy link

The default config should have the same name as the binary .htmlproof.yml.

This sounds great. This would be a really valuable feature.

champa720 added a commit to caepa/news.caepa.org that referenced this issue Jul 22, 2019
Does not complete successfully with github-pages gem group on travis-ci

github/pages-gem/issues/626
gjtorikian/html-proofer/issues/175
@gjtorikian
Copy link
Owner

Won't support myself, but PRs accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants