```ruby
task :find_dead_links do
  cmd = 'htmlproofer ./_site --only-4xx --url-ignore "/blog/,/#content/"'
  system("bundle exec #{cmd}")
end
```

Use gem instead of using cli tool.
user
```ruby
require 'html-proofer'

task :find_dead_links do
  opts = { only_4xx: true, url_ignore: [/blog/, /#content/] }
  begin
    HTMLProofer.check_directory("./_site", opts).run
  rescue => e
  end
end
```
assistant