Thanks to visit codestin.com
Credit goes to github.com

Skip to content

svenkreiss/html5validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML5 Validator

This was written with static site generators like Jekyll and Pelican in mind that push to a static server. html5validator is a command line executable that integrates well with CircleCI and TravisCI and tests all static html files for HTML5 validity.
https://travis-ci.org/svenkreiss/html5validator.svg?branch=master

Integration with CircleCI

Create a circle.yml file:

dependencies:
  pre:
    - sudo pip install html5validator
test:
  override:
    - html5validator

in your repository with static html files and get HTML5 validation on every git push.

Integration with TravisCI

Create a .travis.yml file:

language: python
branches:
  only:
    - gh-pages
python:
 - "2.7"
install:
 - "pip install html5validator"
script: "html5validator"

Enable the repository on TravisCI.

You probably don't want TravisCI to run on the master branch but only on the gh-pages branch. TravisCI has an option (off by default) to run tests only on branches that have a .travis.yml.

You can also use this for user pages (repositories of the form <username>.github.io) where the html files are in the master branch. You only have to remove:

branches:
  only:
    - gh-pages

from .travis.yml. I am using this on my own user page.

pip install

To facilitate the primary use case with TravisCI, this repository also contains a Python package called html5validator which can be installed using pip:

pip install html5validator

This package uses the validator.nu backend which is written in Java. Therefore, a Java Runtime Environment must be available on your system.

Technical

The backend uses the same validator that powers the validator.nu backend.

If you are using grunt already, maybe consider using the grunt-html plugin for grunt instead.

About

Command line tool to validate HTML5 files. Great for continuous integration.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 10