Commit 8812856d authored by Mark Otto's avatar Mark Otto
Browse files

Merge pull request #12037 from twbs/docs_dir

Bring back the `/docs` directory
parents 295736af 05cc2083
No related merge requests found
Showing with 58 additions and 59 deletions
+58 -59
...@@ -44,7 +44,7 @@ module.exports = function (grunt) { ...@@ -44,7 +44,7 @@ module.exports = function (grunt) {
src: ['js/tests/unit/*.js'] src: ['js/tests/unit/*.js']
}, },
assets: { 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) { ...@@ -65,12 +65,12 @@ module.exports = function (grunt) {
csslint: { csslint: {
options: { options: {
csslintrc: '.csslintrc' csslintrc: 'less/.csslintrc'
}, },
src: [ src: [
'dist/css/bootstrap.css', 'dist/css/bootstrap.css',
'dist/css/bootstrap-theme.css', 'dist/css/bootstrap-theme.css',
'docs-assets/css/docs.css' 'docs/assets/css/docs.css'
] ]
}, },
...@@ -118,13 +118,13 @@ module.exports = function (grunt) { ...@@ -118,13 +118,13 @@ module.exports = function (grunt) {
report: 'min' report: 'min'
}, },
src: [ src: [
'docs-assets/js/less.js', 'docs/assets/js/less.js',
'docs-assets/js/jszip.js', 'docs/assets/js/jszip.js',
'docs-assets/js/uglify.js', 'docs/assets/js/uglify.js',
'docs-assets/js/filesaver.js', 'docs/assets/js/filesaver.js',
'docs-assets/js/customizer.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) { ...@@ -185,7 +185,7 @@ module.exports = function (grunt) {
csscomb: { csscomb: {
sort: { sort: {
options: { options: {
sortOrder: '.csscomb.json' config: 'less/.csscomb.json'
}, },
files: { files: {
'dist/css/<%= pkg.name %>.css': ['dist/css/<%= pkg.name %>.css'], 'dist/css/<%= pkg.name %>.css': ['dist/css/<%= pkg.name %>.css'],
...@@ -199,6 +199,16 @@ module.exports = function (grunt) { ...@@ -199,6 +199,16 @@ module.exports = function (grunt) {
expand: true, expand: true,
src: ['fonts/*'], src: ['fonts/*'],
dest: 'dist/' 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) { ...@@ -309,10 +319,10 @@ module.exports = function (grunt) {
grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']); grunt.registerTask('dist-css', ['less', 'csscomb', 'usebanner']);
// Fonts distribution task. // Fonts distribution task.
grunt.registerTask('dist-fonts', ['copy']); grunt.registerTask('dist-docs', ['copy:docs']);
// Full distribution task. // 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. // Default task.
grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']); grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer']);
...@@ -341,9 +351,9 @@ module.exports = function (grunt) { ...@@ -341,9 +351,9 @@ module.exports = function (grunt) {
} }
// Create the `_data` directory if it doesn't already exist // 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 // task for building customizer
...@@ -362,6 +372,6 @@ module.exports = function (grunt) { ...@@ -362,6 +372,6 @@ module.exports = function (grunt) {
} }
var files = getFiles('js') + getFiles('less') + getFiles('fonts') 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)
}); });
}; };
...@@ -6,36 +6,26 @@ pygments: true ...@@ -6,36 +6,26 @@ pygments: true
permalink: pretty permalink: pretty
# Server # Server
source: ./docs
destination: ./_gh_pages destination: ./_gh_pages
host: 0.0.0.0
port: 9001 port: 9001
exclude: baseurl: /
- ".editorconfig" url: http://localhost:9001
- ".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"
# Custom vars # Custom vars
current_version: 3.0.3 current_version: 3.0.3
repo: https://github.com/twbs/bootstrap repo: https://github.com/twbs/bootstrap
download_source: https://github.com/twbs/bootstrap/archive/v3.0.3.zip download:
download_dist: https://github.com/twbs/bootstrap/releases/download/v3.0.3/bootstrap-3.0.3-dist.zip 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 blog: http://blog.getbootstrap.com
expo: http://expo.getbootstrap.com expo: http://expo.getbootstrap.com
sass_repo: https://github.com/twbs/bootstrap-sass sass_repo: https://github.com/twbs/bootstrap-sass
cdn_css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css cdn:
cdn_theme_css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css css: //netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css
cdn_js: //netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js 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
File moved
File moved
File moved
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
================================================== --> ================================================== -->
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="{{ page.base_url }}dist/js/bootstrap.min.js"></script> <script src="dist/js/bootstrap.min.js"></script>
<script src="{{ page.base_url }}docs-assets/js/holder.js"></script> <script src="assets/js/holder.js"></script>
<script src="{{ page.base_url }}docs-assets/js/application.js"></script> <script src="assets/js/application.js"></script>
{% if page.slug == "customize" %} {% if page.slug == "customize" %}
<script src="{{ page.base_url }}docs-assets/js/raw-files.js"></script> <script src="assets/js/raw-files.js"></script>
<script src="{{ page.base_url }}docs-assets/js/customize.js"></script> <script src="assets/js/customize.js"></script>
{% endif %} {% endif %}
{% comment %} {% comment %}
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
</title> </title>
<!-- Bootstrap core CSS --> <!-- Bootstrap core CSS -->
<link href="{{ page.base_url }}dist/css/bootstrap.min.css" rel="stylesheet"> <link href="{{ site.baseurl }}dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Documentation extras --> <!-- Documentation extras -->
<link href="{{ page.base_url }}docs-assets/css/docs.css" rel="stylesheet"> <link href="{{ site.baseurl }}assets/css/docs.css" rel="stylesheet">
<link href="{{ page.base_url }}docs-assets/css/pygments-manni.css" rel="stylesheet"> <link href="{{ site.baseurl }}assets/css/pygments-manni.css" rel="stylesheet">
<!--[if lt IE 9]><script src="{{ page.base_url }}docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]--> <!--[if lt IE 9]><script src="{{ site.baseurl }}assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
<![endif]--> <![endif]-->
<!-- Favicons --> <!-- Favicons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ page.base_url }}docs-assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="shortcut icon" href="{{ page.base_url }}docs-assets/ico/favicon.ico"> <link rel="shortcut icon" href="{{ site.baseurl }}assets/ico/favicon.ico">
<script> <script>
var _gaq = _gaq || []; var _gaq = _gaq || [];
......
File moved
File moved
File moved
File moved
File moved
...@@ -7,29 +7,29 @@ ...@@ -7,29 +7,29 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a href="{{ page.base_url }}" class="navbar-brand">Bootstrap</a> <a href="{{ site.baseurl }}" class="navbar-brand">Bootstrap</a>
</div> </div>
<nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation"> <nav class="collapse navbar-collapse bs-navbar-collapse" role="navigation">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li{% if page.slug == "getting-started" %} class="active"{% endif %}> <li{% if page.slug == "getting-started" %} class="active"{% endif %}>
<a href="{{ page.base_url }}getting-started">Getting started</a> <a href="{{ site.baseurl }}getting-started">Getting started</a>
</li> </li>
<li{% if page.slug == "css" %} class="active"{% endif %}> <li{% if page.slug == "css" %} class="active"{% endif %}>
<a href="{{ page.base_url }}css">CSS</a> <a href="{{ site.baseurl }}css">CSS</a>
</li> </li>
<li{% if page.slug == "components" %} class="active"{% endif %}> <li{% if page.slug == "components" %} class="active"{% endif %}>
<a href="{{ page.base_url }}components">Components</a> <a href="{{ site.baseurl }}components">Components</a>
</li> </li>
<li{% if page.slug == "js" %} class="active"{% endif %}> <li{% if page.slug == "js" %} class="active"{% endif %}>
<a href="{{ page.base_url }}javascript">JavaScript</a> <a href="{{ site.baseurl }}javascript">JavaScript</a>
</li> </li>
<li{% if page.slug == "customize" %} class="active"{% endif %}> <li{% if page.slug == "customize" %} class="active"{% endif %}>
<a href="{{ page.base_url }}customize">Customize</a> <a href="{{ site.baseurl }}customize">Customize</a>
</li> </li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li{% if page.slug == "about" %} class="active"{% endif %}> <li{% if page.slug == "about" %} class="active"{% endif %}>
<a href="{{ page.base_url }}about">About</a> <a href="{{ site.baseurl }}about">About</a>
</li> </li>
</ul> </ul>
</nav> </nav>
......
<div class="bs-old-docs"> <div class="bs-old-docs">
<div class="container"> <div class="container">
<strong> <strong>
<a href="{{ page.base_url }}2.3.2/">Looking for Bootstrap 2.3.2 docs?</a> <a href="{{ site.baseurl }}2.3.2/">Looking for Bootstrap 2.3.2 docs?</a>
</strong> </strong>
We've moved it to a new home while we push forward with Bootstrap 3. <a href="http://blog.getbootstrap.com/">Read the blog</a> for details. We've moved it to a new home while we push forward with Bootstrap 3. <a href="http://blog.getbootstrap.com/">Read the blog</a> for details.
</div> </div>
......
File moved
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<ul class="footer-links"> <ul class="footer-links">
<li>Currently v{{ site.current_version }}</li> <li>Currently v{{ site.current_version }}</li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="{{ page.base_url }}2.3.2/">Bootstrap 2.3.2 docs</a></li> <li><a href="{{ site.baseurl }}2.3.2/">Bootstrap 2.3.2 docs</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
<li><a href="{{ site.blog }}">Blog</a></li> <li><a href="{{ site.blog }}">Blog</a></li>
<li class="muted">&middot;</li> <li class="muted">&middot;</li>
......
...@@ -23,13 +23,13 @@ ...@@ -23,13 +23,13 @@
Currently v{{ site.current_version }} Currently v{{ site.current_version }}
</li> </li>
<li> <li>
<a href="{{ page.base_url }}2.3.2/">Bootstrap 2.3.2 docs</a> <a href="{{ site.baseurl }}2.3.2/">Bootstrap 2.3.2 docs</a>
</li> </li>
<li> <li>
<a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a> <a href="{{ site.repo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'GitHub project']);">GitHub project</a>
</li> </li>
<li> <li>
<a href="{{ page.base_url }}getting-started/#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a> <a href="{{ site.baseurl }}getting-started/#examples" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Examples']);">Examples</a>
</li> </li>
<li> <li>
<a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Expo</a> <a href="{{ site.expo }}" onclick="_gaq.push(['_trackEvent', 'Jumbotron actions', 'Jumbotron links', 'Expo']);">Expo</a>
......
...@@ -3,7 +3,6 @@ layout: default ...@@ -3,7 +3,6 @@ layout: default
title: About title: About
slug: about slug: about
lead: "Learn about the history of Bootstrap, meet the core team, and check out the ever-growing community resources." lead: "Learn about the history of Bootstrap, meet the core team, and check out the ever-growing community resources."
base_url: "../"
--- ---
......
File moved
Supports Markdown
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