<commit_before>HTML5 Validator Integration for TravisCI
========================================

    This was written with static site generators like `Jekyll <http://jekyllrb.com/>`_
    and `Pelican <http://blog.getpelican.com/>`_ in mind.

Create a ``.travis.yml`` file::

    language: python
    branches:
      only:
        - gh-pages
    python:
     - "2.7"
    install:
     - "pip install git+https://github.com/svenkreiss/html5validator.git"
    script: "html5validator"

in your repository with static html files and get HTML5 validation on every 
``git push``. Enable the repository on `TravisCI <https://travis-ci.org>`_.

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``.

This button shows the HTML5 validity of this `gh-pages` branch:

.. image:: https://travis-ci.org/svenkreiss/html5validator.svg?branch=gh-pages
    :target: https://travis-ci.org/svenkreiss/html5validator)

And this one shows the validity of the `gh-pages-failing` branch:

.. image:: https://travis-ci.org/svenkreiss/html5validator.svg?branch=gh-pages-failing
    :target: https://travis-ci.org/svenkreiss/html5validator)


User Pages
----------

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 <https://github.com/svenkreiss/svenkreiss.github.io/blob/master/.travis.yml>`_.<commit_msg>better formatting for the travis buttons<commit_after>HTML5 Validator Integration for TravisCI
========================================

    This was written with static site generators like `Jekyll <http://jekyllrb.com/>`_
    and `Pelican <http://blog.getpelican.com/>`_ in mind.

Create a ``.travis.yml`` file::

    language: python
    branches:
      only:
        - gh-pages
    python:
     - "2.7"
    install:
     - "pip install git+https://github.com/svenkreiss/html5validator.git"
    script: "html5validator"

in your repository with static html files and get HTML5 validation on every 
``git push``. Enable the repository on `TravisCI <https://travis-ci.org>`_.

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``.

These buttons show the HTML5 validity of the `gh-pages` and `gh-pages-failing` branches:

.. image:: https://travis-ci.org/svenkreiss/html5validator.svg?branch=gh-pages
    :target: https://travis-ci.org/svenkreiss/html5validator)
.. image:: https://travis-ci.org/svenkreiss/html5validator.svg?branch=gh-pages-failing
    :target: https://travis-ci.org/svenkreiss/html5validator)


User Pages
----------

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 <https://github.com/svenkreiss/svenkreiss.github.io/blob/master/.travis.yml>`_.
{'fraction_non_alphanumeric': 0.1476857490864799, 'fraction_numerical': 0.006699147381242387, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '588640', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1068, 'n_words': 324}