Permalink
Browse files

Make the docs multipage

- Move the API documentation off the homepage
- Remove the “Contributing” section and add the information to the readme
- Add Jekyll for building the docs
- Add Google Analytics
  • Loading branch information...
1 parent d91fd22 commit e38b3fc8c476a5bbd74fcb414a7e12ba94ed915f @sorich87 committed Jan 26, 2014
View
@@ -0,0 +1,21 @@
+EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 2
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
View
@@ -1,4 +1,5 @@
.grunt
+docs-build
node_modules
components
bootstrap-tour.sublime-project
View
@@ -40,8 +40,8 @@ module.exports = (grunt) ->
level: "error"
max_line_length:
level: "ignore"
- default: ["Gruntfile.coffee", "src/**/*.coffee"]
- doc: ["Gruntfile.coffee", "docs/*.coffee"]
+ default: ["Gruntfile.coffee", "src/{,*/}*.coffee"]
+ doc: ["Gruntfile.coffee", "docs/assets/coffee/*.coffee"]
clean:
default: "build"
@@ -65,8 +65,8 @@ module.exports = (grunt) ->
dest: "test"
ext: ".spec.js"
doc:
- src: "docs/index.coffee"
- dest: "docs/assets/js/index.js"
+ src: "docs/assets/coffee/docs.coffee"
+ dest: "docs/assets/js/docs.js"
concat:
options:
@@ -115,18 +115,24 @@ module.exports = (grunt) ->
dest: "build/js"
ext: ".min.js"
+ jekyll:
+ build: {}
+
watch:
+ options:
+ livereload: true
default:
files: ["src/coffee/*.coffee"]
tasks: ["build"]
test:
files: ["src/spec/*.coffee"]
tasks: ["test"]
doc:
- files: ["docs/*.coffee"]
+ files: ["docs/assets/coffee/*.coffee"]
tasks: ["coffeelint:doc", "coffee:doc"]
- options:
- livereload: true
+ jekyll:
+ files: ["docs/{,*/}*.html"]
+ tasks: ["jekyll"]
jasmine:
options:
@@ -155,8 +161,9 @@ module.exports = (grunt) ->
connect:
default:
options:
+ livereload: true
port: 3000
- base: "docs"
+ base: "docs-build"
open:
default:
@@ -196,8 +203,8 @@ module.exports = (grunt) ->
]
grunt.registerTask "default", ["run"]
- grunt.registerTask "run", ["build", "connect", "open", "watch:doc"]
- grunt.registerTask "build", ["clean", "coffeelint", "coffee", "less", "concat", "uglify", "copy"]
+ grunt.registerTask "run", ["build", "connect", "open", "watch"]
+ grunt.registerTask "build", ["clean", "coffeelint", "coffee", "less", "concat", "uglify", "copy", "jekyll"]
grunt.registerTask "test", ["build", "jasmine"]
grunt.registerTask "release", "Release a new version, push it and publish it", (target) ->
target = "patch" unless target
View
@@ -2,34 +2,35 @@
Quick and easy way to build your product tours with Twitter Bootstrap Popovers.
-*Compatible with Bootstrap <= 3.0.0*
+*Compatible with Bootstrap >= 2.3.0*
-## Demo and Documentation ##
+## Demo and Documentation
[http://bootstraptour.com](http://bootstraptour.com)
-## TODO ##
+## TODO
- Add the smooth scrolling when the popover is outside the viewport
- Define an appropriate tag + milestone system
-## Contributing ##
->In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
+## Contributing
+In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
Feel free to contribute with pull requests, bug reports or enhancement suggestions.
We use [Grunt](http://gruntjs.com/) and [Jasmine](http://pivotal.github.io/jasmine/). Both make your lives easier ;)
-### How to run/develop
+### How to build/develop
-Install the dependencies
+Files to be developed are located under `./src/`
+Compiled sources are then automatically put under `./build/` (and `./test/`)
+
+#### Installing the dependencies
```bash
npm install
+gem install jekyll
```
-Files to be developed are located under `./src/`
-Compiled sources are then automatically put under `./build/` (and `./test/`)
-
-Run main tasks (check `Gruntfile.coffee` for more infos)
+#### Running Grunt tasks
```javascript
// Start a server and run the demo page
@@ -39,22 +40,15 @@ grunt run
grunt build
// Compile all sources and run the tests
grunt test
-// Automatically release a new version (see below for more details)
-grunt release
-```
-
-[More information here](http://bootstraptour.com/#grunt-usage)
-
-## Releasing ##
-Releasing a new version is completely automated using the Grunt task `grunt release`.
-
-```javascript
+// Automatically release a new version
grunt release // patch release
grunt release:minor // minor release
grunt release:major // major release
```
-## License ##
+Check `Gruntfile.coffee` for more infos.
+
+## License
+
Code licensed under the [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).
Documentation licensed under [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/).
-Well, the same licenses as Bootstrap. We are lazy! ;)
View
@@ -0,0 +1,5 @@
+markdown: rdiscount
+permalink: pretty
+source: ./docs
+destination: ./docs-build
+encoding: UTF-8

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,6 @@
+<script src="/assets/vendor/jquery.js"></script>
+<script src="/assets/vendor/bootstrap.js"></script>
+<script src="/assets/vendor/jquery.smoothscroll.js"></script>
+<script src="/assets/vendor/md5.js"></script>
+<script src="/assets/js/bootstrap-tour.js"></script>
+<script src="/assets/js/docs.js"></script>
View
@@ -0,0 +1,28 @@
+<meta charset="utf-8">
+<meta http-equiv="X-UA-Compatible" content="IE=edge">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<meta name="description" content="Quick and easy way to build your product tours with Twitter Bootstrap Popovers.">
+
+<title>
+ {% if page.title == "Bootstrap Tour" %}
+ {{ page.title }}
+ {% else %}
+ {{ page.title }} &middot; Bootstrap Tour
+ {% endif %}
+</title>
+
+<link href="/assets/vendor/bootstrap.min.css" rel="stylesheet">
+<link href="/assets/vendor/pygments-manni.css" rel="stylesheet">
+<link href="/assets/css/bootstrap-tour.css" rel="stylesheet">
+<link href="/assets/css/docs.css" rel="stylesheet">
+<!--[if lt IE 9]><script src="/assets/vendor/html5shiv.js"></script><![endif]-->
+
+<script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-47485647-1', 'bootstraptour.com');
+ ga('send', 'pageview');
+</script>
View
@@ -0,0 +1,23 @@
+<div id="navbar" class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container">
+ <button type="button" class="navbar-toggle pull-right" data-toggle="collapse" data-target=".navbar-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a href="/" class="navbar-brand">Bootstrap Tour</a>
+ <div class="collapse navbar-collapse">
+ <ul class="navbar-nav nav">
+ <li {% if page.slug == "home" %} class="active"{% endif %}>
+ <a href="/">Getting started</a>
+ </li>
+ <li {% if page.slug == "api" %} class="active"{% endif %}>
+ <a href="/api">API documentation</a>
+ </li>
+ <li>
+ <a href="https://github.com/sorich87/bootstrap-tour/issues">Bug reports</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+</div>
View
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ {% include header.html %}
+ </head>
+ <body>
+ <a href="https://github.com/sorich87/bootstrap-tour" id="github"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
+ {% include nav.html %}
+ {{ content }}
+ {% include footer.html %}
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit e38b3fc

Please sign in to comment.