jekyll-test 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +25 -20
- data/lib/jekyll/test/jekyll.rake +40 -0
- data/lib/jekyll/test/tasks.rb +2 -0
- data/lib/jekyll/test/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b006f21b3357879ec08439ed3f0edb01761887d9
|
4
|
+
data.tar.gz: 760706b545b80f1d402ca05bcd5c721a8b5950aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43c75fed06e6ab263e3cdcd24b9db4ff7f5acaf53930cdc76570c12e1ab34ad13e75947bcb5d91715538b76606999325d26b00697f82d97b2b62179b53cad75e
|
7
|
+
data.tar.gz: 7bab9b15c9a9e8a1eae2163e324a5f358ebd4182b62de59ba94660d87d980cf87d78affdf175065328e04a1e1e16b9e2396bc71e257e7296da27ec318ec42b33
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -1,39 +1,44 @@
|
|
1
|
-
# Jekyll
|
1
|
+
# Jekyll-Test
|
2
2
|
|
3
|
-
|
3
|
+
`jekyll-test` is a highly opinionated test configuration for Jekyll sites to let you create well-formed sites with minimal configuration.
|
4
4
|
|
5
|
-
|
5
|
+
It provides two rake tasks:
|
6
6
|
|
7
|
-
|
7
|
+
`jekyll:check` will test your site for HTML validity, internal link correctness, alt tags, OpenGraph validity, https usage, and a load more. It will complain about as much as it can. You want this to pass.
|
8
8
|
|
9
|
-
|
9
|
+
`jekyll:check_external_links` will check all outgoing links as well. This is a separate task as this often fails due to network errors, etc, and you don't want to depend on it passing. Use it for information only.
|
10
10
|
|
11
|
-
|
12
|
-
gem 'jekyll-test'
|
13
|
-
```
|
14
|
-
|
15
|
-
And then execute:
|
11
|
+
## Usage
|
16
12
|
|
17
|
-
|
13
|
+
Add this line to your site's Gemfile and run `bundle`:
|
18
14
|
|
19
|
-
|
15
|
+
```ruby
|
16
|
+
group :test do
|
17
|
+
gem 'jekyll-test'
|
18
|
+
end
|
19
|
+
```
|
20
20
|
|
21
|
-
|
21
|
+
In your Rakefile, then add:
|
22
22
|
|
23
|
-
|
23
|
+
```ruby
|
24
|
+
require 'jekyll/test/tasks'
|
25
|
+
```
|
24
26
|
|
25
|
-
|
27
|
+
We suggest making `jekyll:check` your default task by adding this to your Rakefile:
|
26
28
|
|
27
|
-
|
29
|
+
```rake
|
30
|
+
task default: "jekyll:check"
|
31
|
+
```
|
28
32
|
|
29
|
-
|
33
|
+
## Coming soon
|
30
34
|
|
31
|
-
|
35
|
+
* travis setup for using these tasks in a CI environment
|
36
|
+
* spellchecking
|
32
37
|
|
33
38
|
## Contributing
|
34
39
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/Floppy/jekyll-test. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
41
|
|
37
42
|
## Code of Conduct
|
38
43
|
|
39
|
-
Everyone interacting in the Jekyll::Test project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-test/blob/master/CODE_OF_CONDUCT.md).
|
44
|
+
Everyone interacting in the Jekyll::Test project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-test/blob/master/CODE_OF_CONDUCT.md).
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'html-proofer'
|
2
|
+
|
3
|
+
def check_site(options = {})
|
4
|
+
defaults = {
|
5
|
+
assume_extension: ".html",
|
6
|
+
typhoeus: {
|
7
|
+
ssl_verifypeer: false,
|
8
|
+
ssl_verifyhost: 0,
|
9
|
+
timeout: 3,
|
10
|
+
},
|
11
|
+
}
|
12
|
+
HTMLProofer.check_directory("./_site", defaults.merge(options)).run
|
13
|
+
end
|
14
|
+
|
15
|
+
namespace :jekyll do
|
16
|
+
|
17
|
+
task :rebuild do
|
18
|
+
sh "rm -rf _site"
|
19
|
+
sh "bundle exec jekyll build"
|
20
|
+
end
|
21
|
+
|
22
|
+
task :check => :rebuild do
|
23
|
+
check_site(
|
24
|
+
check_html: true,
|
25
|
+
check_favicon: true,
|
26
|
+
#check_sri: true, #soon!
|
27
|
+
check_img_http: true,
|
28
|
+
check_opengraph: true,
|
29
|
+
disable_external: true,
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
task :check_external_links => :rebuild do
|
34
|
+
check_site(
|
35
|
+
url_ignore: [],
|
36
|
+
check_external_hash: true,
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
data/lib/jekyll/test/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
92
|
- ".travis.yml"
|
93
|
+
- CHANGELOG.md
|
93
94
|
- CODE_OF_CONDUCT.md
|
94
95
|
- Gemfile
|
95
96
|
- README.md
|
@@ -98,6 +99,8 @@ files:
|
|
98
99
|
- bin/setup
|
99
100
|
- jekyll-test.gemspec
|
100
101
|
- lib/jekyll/test.rb
|
102
|
+
- lib/jekyll/test/jekyll.rake
|
103
|
+
- lib/jekyll/test/tasks.rb
|
101
104
|
- lib/jekyll/test/version.rb
|
102
105
|
homepage: https://github.com/Floppy/jekyll-test
|
103
106
|
licenses: []
|