Update instructions for building docs locally
This commit is contained in:
parent
9a79140920
commit
8534d3e2ef
@ -22,17 +22,46 @@ eventually closed, so don't do that.
|
|||||||
|
|
||||||
How can I build these docs manually?
|
How can I build these docs manually?
|
||||||
------------------------------------
|
------------------------------------
|
||||||
In the [main Select2 repository][select2-source], you can build the
|
|
||||||
documentation by executing
|
### Requirements
|
||||||
|
|
||||||
|
##### Ruby and Jekyll
|
||||||
|
|
||||||
|
Jekyll is a static site builder written in Ruby. You will need **the latest version** of [Jekyll][jekyll] installed to build the Select2 documentation.
|
||||||
|
|
||||||
|
First, [make sure that you have a Ruby environment set up][jekyll-quickstart]. Then, to install Jekyll:
|
||||||
|
|
||||||
|
`gem install jekyll bundler`
|
||||||
|
|
||||||
|
To upgrade Jekyll:
|
||||||
|
|
||||||
|
`gem update jekyll`
|
||||||
|
|
||||||
|
##### npm and Grunt
|
||||||
|
|
||||||
|
Select2 uses [Grunt][grunt], which is an npm package, as a task runner. To run the build task, you will need to first [install the latest version of npm and Node.js][nodejs] as well as the [Grunt CLI][grunt-cli].
|
||||||
|
|
||||||
|
### Building the docs with Grunt
|
||||||
|
|
||||||
|
This assumes that you have already cloned the Select2 repo to your local development environment. In the [main Select2 repository][select2-source], you will first need to install the npm dependencies locally:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, you can build and launch the documentation by running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
grunt docs
|
grunt docs
|
||||||
```
|
```
|
||||||
|
|
||||||
Which will start up the documentation on port 4000. You will need
|
This will start up the documentation on port 4000 ([http://localhost:4000](http://localhost:4000)).
|
||||||
[Jekyll][jekyll] installed to build the documentation.
|
|
||||||
|
|
||||||
[jekyll]: http://jekyllrb.com/
|
[jekyll]: http://jekyllrb.com/
|
||||||
|
[jekyll-quickstart]: https://jekyllrb.com/docs/quickstart/
|
||||||
|
[grunt]: https://gruntjs.com
|
||||||
|
[grunt-cli]: https://gruntjs.com/getting-started
|
||||||
|
[nodejs]: https://nodejs.org/en/download/
|
||||||
[select2]: https://select2.github.io
|
[select2]: https://select2.github.io
|
||||||
[select2-docs-source]: https://github.com/select2/select2.github.io
|
[select2-docs-source]: https://github.com/select2/select2.github.io
|
||||||
[select2-source]: https://github.com/select2/select2
|
[select2-source]: https://github.com/select2/select2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user