Commit 8aecfb4e authored by Mark Otto's avatar Mark Otto

Merge pull request #9396 from twbs/docs-html-validation

add HTML5 validation of docs pages to the build
parents 49576704 f111c3e7
...@@ -33,6 +33,9 @@ nbproject ...@@ -33,6 +33,9 @@ nbproject
*.komodoproject *.komodoproject
.komodotools .komodotools
# grunt-html-validation
validation-staus.json
# Folders to ignore # Folders to ignore
.hg .hg
.svn .svn
......
...@@ -2,6 +2,7 @@ language: node_js ...@@ -2,6 +2,7 @@ language: node_js
node_js: node_js:
- 0.8 - 0.8
before_script: before_script:
- gem install jekyll
- npm install -g grunt-cli - npm install -g grunt-cli
env: env:
global: global:
......
...@@ -102,6 +102,19 @@ module.exports = function(grunt) { ...@@ -102,6 +102,19 @@ module.exports = function(grunt) {
} }
}, },
jekyll: {
docs: {}
},
validation: {
options: {
reset: true,
},
files: {
src: ["_gh_pages/**/*.html"]
}
},
watch: { watch: {
src: { src: {
files: '<%= jshint.src.src %>', files: '<%= jshint.src.src %>',
...@@ -127,12 +140,17 @@ module.exports = function(grunt) { ...@@ -127,12 +140,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-html-validation');
grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-recess'); grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('browserstack-runner'); grunt.loadNpmTasks('browserstack-runner');
// Docs HTML validation task
grunt.registerTask('validate-docs', ['jekyll', 'validation']);
// Test task. // Test task.
var testSubtasks = ['jshint', 'qunit']; var testSubtasks = ['jshint', 'qunit', 'validate-docs'];
// Only run BrowserStack tests under Travis // Only run BrowserStack tests under Travis
if (process.env.TRAVIS) { if (process.env.TRAVIS) {
// Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key // Only run BrowserStack tests if this is a mainline commit in twbs/bootstrap, or you have your own BrowserStack key
......
This diff is collapsed.
...@@ -2012,9 +2012,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline. ...@@ -2012,9 +2012,9 @@ For example, <code>&lt;section&gt;</code> should be wrapped as inline.
<p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p> <p>Keep in mind that Internet Explorer 8 lacks support for rounded corners.</p>
</div> </div>
<div class="bs-example bs-example-images"> <div class="bs-example bs-example-images">
<img data-src="holder.js/140x140" class="img-rounded" alt="A generic square placeholder image with rounded corners"> <img data-src="holder.js/140x140" src="data:image/png;base64," class="img-rounded" alt="A generic square placeholder image with rounded corners">
<img data-src="holder.js/140x140" class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible"> <img data-src="holder.js/140x140" src="data:image/png;base64," class="img-circle" alt="A generic square placeholder image where only the portion within the circle circumscribed about said square is visible">
<img data-src="holder.js/140x140" class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera"> <img data-src="holder.js/140x140" src="data:image/png;base64," class="img-thumbnail" alt="A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera">
</div> </div>
{% highlight html %} {% highlight html %}
<img src="..." alt="..." class="img-rounded"> <img src="..." alt="..." class="img-rounded">
......
...@@ -1613,13 +1613,13 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { ...@@ -1613,13 +1613,13 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {
</ol> </ol>
<div class="carousel-inner"> <div class="carousel-inner">
<div class="item active"> <div class="item active">
<img data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="First slide"> <img src="data:image/png;base64," data-src="holder.js/900x500/auto/#777:#555/text:First slide" alt="First slide">
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt="Second slide"> <img src="data:image/png;base64," data-src="holder.js/900x500/auto/#666:#444/text:Second slide" alt="Second slide">
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt="Third slide"> <img src="data:image/png;base64," data-src="holder.js/900x500/auto/#555:#333/text:Third slide" alt="Third slide">
</div> </div>
</div> </div>
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
...@@ -1675,21 +1675,21 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { ...@@ -1675,21 +1675,21 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {
</ol> </ol>
<div class="carousel-inner"> <div class="carousel-inner">
<div class="item active"> <div class="item active">
<img data-src="holder.js/900x500/auto/#777:#777" alt=""> <img data-src="holder.js/900x500/auto/#777:#777" src="data:image/png;base64," alt="First slide image">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>First slide label</h3> <h3>First slide label</h3>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p> <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#666:#666" alt=""> <img data-src="holder.js/900x500/auto/#666:#666" src="data:image/png;base64," alt="Second slide image">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>Second slide label</h3> <h3>Second slide label</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img data-src="holder.js/900x500/auto/#555:#5555" alt=""> <img data-src="holder.js/900x500/auto/#555:#5555" src="data:image/png;base64," alt="Third slide image">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>Third slide label</h3> <h3>Third slide label</h3>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
...@@ -1706,7 +1706,7 @@ $('#myCollapsible').on('hidden.bs.collapse', function () { ...@@ -1706,7 +1706,7 @@ $('#myCollapsible').on('hidden.bs.collapse', function () {
</div><!-- /example --> </div><!-- /example -->
{% highlight html %} {% highlight html %}
<div class="item active"> <div class="item active">
<img src="..." alt=""> <img src="..." alt="...">
<div class="carousel-caption"> <div class="carousel-caption">
<h3>...</h3> <h3>...</h3>
<p>...</p> <p>...</p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment