Advertisement
Guest User

Untitled

a guest
May 27th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. # Validate Jekyll built ./_site
  2.  
  3. This is using GitLab with Runner support and https://github.com/gjtorikian/html-proofer
  4. First, install the gem:
  5.  
  6. ```gem install html-proofer```
  7.  
  8. or system wide:
  9.  
  10. ```sudo gem install html-proofer```
  11.  
  12. Then edit your `.gitlab-ci.yml`:
  13.  
  14. ```
  15. job1:
  16. script: "jekyll doctor; jekyll build; htmlproofer ./_site --allow-hash-href --check-html --empty-alt-ignore --only-4xx"
  17. ```
  18.  
  19. And run the runner. If errors are found, even from the HTML validator, build will be marked as failed. Otherwise as passed.
  20.  
  21. Example:
  22.  
  23. gitlab-ci-multi-runner 1.2.0 (3a4fcd4)
  24. Using Shell executor...
  25. Running on [censored]...
  26. Fetching changes...
  27. Removing .sass-cache/
  28. Removing _site/
  29. HEAD is now at a384198 Update 2015-01-17-phpmyadmin-PMA-vuln.markdown
  30. From https://[censored]/wirehack7/capsop.com
  31. a384198..b3f5e75 master -> origin/master
  32. Checking out b3f5e753 as master...
  33. $ jekyll doctor; jekyll build; htmlproofer ./_site --allow-hash-href --check-html --empty-alt-ignore --only-4xx
  34. Configuration file: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_config.yml
  35. Your test results are in. Everything looks fine.
  36. Configuration file: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_config.yml
  37. Source: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com
  38. Destination: /home/gitlab-runner/builds/cc9cc216/0/wirehack7/capsop.com/_site
  39. Incremental build: disabled. Enable with --incremental
  40. Generating...
  41. done in 0.514 seconds.
  42. Auto-regeneration: disabled. Use --watch to enable.
  43. Running ["ImageCheck", "HtmlCheck", "LinkCheck", "ScriptCheck"] on ["./_site"] on *.html...
  44.  
  45.  
  46. Checking 132 external links...
  47. Ran on 19 files!
  48.  
  49.  
  50. HTML-Proofer finished successfully.
  51.  
  52. Build succeeded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement