diff --git a/Gruntfile.js b/Gruntfile.js index 3f977dbfc7..5ba7ca8bd5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -44,7 +44,7 @@ module.exports = function (grunt) { src: ['js/tests/unit/*.js'] }, assets: { - src: ['docs-assets/js/application.js', 'docs-assets/js/customizer.js'] + src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js'] } }, @@ -65,12 +65,12 @@ module.exports = function (grunt) { csslint: { options: { - csslintrc: '.csslintrc' + csslintrc: 'less/.csslintrc' }, src: [ 'dist/css/bootstrap.css', 'dist/css/bootstrap-theme.css', - 'docs-assets/css/docs.css' + 'docs/assets/css/docs.css' ] }, @@ -118,13 +118,13 @@ module.exports = function (grunt) { report: 'min' }, src: [ - 'docs-assets/js/less.js', - 'docs-assets/js/jszip.js', - 'docs-assets/js/uglify.js', - 'docs-assets/js/filesaver.js', - 'docs-assets/js/customizer.js' + 'docs/assets/js/less.js', + 'docs/assets/js/jszip.js', + 'docs/assets/js/uglify.js', + 'docs/assets/js/filesaver.js', + 'docs/assets/js/customizer.js' ], - dest: 'docs-assets/js/customize.js' + dest: 'docs/assets/js/customize.js' } }, @@ -185,7 +185,7 @@ module.exports = function (grunt) { csscomb: { sort: { options: { - sortOrder: '.csscomb.json' + config: 'less/.csscomb.json' }, files: { 'dist/css/<%= pkg.name %>.css': ['dist/css/<%= pkg.name %>.css'], @@ -199,6 +199,16 @@ module.exports = function (grunt) { expand: true, src: ['fonts/*'], dest: 'dist/' + }, + docs: { + expand: true, + cwd: './dist', + src: [ + '{css,js}/*.min.*', + '{css}/*.map', + 'fonts/*' + ], + dest: 'docs/dist' } }, @@ -309,10 +319,10 @@ module.exports = function (grunt) { grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']); // Fonts distribution task. - grunt.registerTask('dist-fonts', ['copy']); + grunt.registerTask('dist-docs', ['copy:docs']); // Full distribution task. - grunt.registerTask('dist', ['clean', 'dist-css', 'dist-fonts', 'dist-js']); + grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-js']); // Default task. grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']); @@ -341,9 +351,9 @@ module.exports = function (grunt) { } // Create the `_data` directory if it doesn't already exist - if (!fs.existsSync('_data')) fs.mkdirSync('_data') + if (!fs.existsSync('docs/_data')) fs.mkdirSync('docs/_data') - fs.writeFileSync('_data/glyphicons.yml', glyphiconsData) + fs.writeFileSync('docs/_data/glyphicons.yml', glyphiconsData) }); // task for building customizer @@ -362,6 +372,6 @@ module.exports = function (grunt) { } var files = getFiles('js') + getFiles('less') + getFiles('fonts') - fs.writeFileSync('docs-assets/js/raw-files.js', files) + fs.writeFileSync('docs/assets/js/raw-files.js', files) }); }; diff --git a/_config.yml b/_config.yml index 693f22a205..b6e18adbea 100644 --- a/_config.yml +++ b/_config.yml @@ -6,36 +6,26 @@ pygments: true permalink: pretty # Server +source: ./docs destination: ./_gh_pages +host: 0.0.0.0 port: 9001 -exclude: -- ".editorconfig" -- ".gitignore" -- "bower.json" -- "CNAME" -- "composer.json" -- "CONTRIBUTING.md" -- "DOCS-LICENSE" -- "Gruntfile.js" -- "less" -- "LICENSE" -- "node_modules" -- "package.json" -- "README.md" -- "sauce_browsers.yml" -- "test-infra" +baseurl: / +url: http://localhost:9001 # Custom vars current_version: 3.0.3 repo: https://github.com/twbs/bootstrap -download_source: https://github.com/twbs/bootstrap/archive/v3.0.3.zip -download_dist: https://github.com/twbs/bootstrap/releases/download/v3.0.3/bootstrap-3.0.3-dist.zip +download: + source: https://github.com/twbs/bootstrap/archive/v3.0.3.zip + dist: https://github.com/twbs/bootstrap/releases/download/v3.0.3/bootstrap-3.0.3-dist.zip blog: http://blog.getbootstrap.com expo: http://expo.getbootstrap.com sass_repo: https://github.com/twbs/bootstrap-sass -cdn_css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css -cdn_theme_css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css -cdn_js: //netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js +cdn: + css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css + css_theme: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css + js: //netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js diff --git a/DOCS-LICENSE b/docs/LICENSE-DOCS similarity index 100% rename from DOCS-LICENSE rename to docs/LICENSE-DOCS diff --git a/_data/glyphicons.yml b/docs/_data/glyphicons.yml similarity index 100% rename from _data/glyphicons.yml rename to docs/_data/glyphicons.yml diff --git a/_includes/ads.html b/docs/_includes/ads.html similarity index 100% rename from _includes/ads.html rename to docs/_includes/ads.html diff --git a/_includes/footer.html b/docs/_includes/footer.html similarity index 79% rename from _includes/footer.html rename to docs/_includes/footer.html index 095e96eb59..b8e19b5234 100644 --- a/_includes/footer.html +++ b/docs/_includes/footer.html @@ -2,15 +2,15 @@ ================================================== --> - + - + - + {% if page.slug == "customize" %} - - + + {% endif %} {% comment %} diff --git a/_includes/header.html b/docs/_includes/header.html similarity index 76% rename from _includes/header.html rename to docs/_includes/header.html index 1275979f70..3b64958974 100644 --- a/_includes/header.html +++ b/docs/_includes/header.html @@ -14,12 +14,12 @@ - + - - - + + + - - + + + {% endhighlight %}
@@ -103,12 +102,12 @@ bootstrap/ │ ├── css/ │ ├── js/ │ └── fonts/ -├── docs-assets/ +├── docs/assets/ ├── examples/ └── *.html {% endhighlight %}
-

The less/, js/, and fonts/ are the source code for our CSS, JS, and icon fonts (respectively). The dist/ folder includes everything listed in the precompiled download section above. docs-assets/, examples/, and all *.html files are for our documentation. Beyond that, any other included file provides support for packages, license information, and development.

+

The less/, js/, and fonts/ are the source code for our CSS, JS, and icon fonts (respectively). The dist/ folder includes everything listed in the precompiled download section above. docs/assets/, examples/, and all *.html files are for our documentation. Beyond that, any other included file provides support for packages, license information, and development.