Skip to content

Commit 8534d3e

Browse files
committed
Update instructions for building docs locally
1 parent 9a79140 commit 8534d3e

1 file changed

Lines changed: 33 additions & 4 deletions

File tree

docs/README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,46 @@ eventually closed, so don't do that.
2222

2323
How can I build these docs manually?
2424
------------------------------------
25-
In the [main Select2 repository][select2-source], you can build the
26-
documentation by executing
25+
26+
### Requirements
27+
28+
##### Ruby and Jekyll
29+
30+
Jekyll is a static site builder written in Ruby. You will need **the latest version** of [Jekyll][jekyll] installed to build the Select2 documentation.
31+
32+
First, [make sure that you have a Ruby environment set up][jekyll-quickstart]. Then, to install Jekyll:
33+
34+
`gem install jekyll bundler`
35+
36+
To upgrade Jekyll:
37+
38+
`gem update jekyll`
39+
40+
##### npm and Grunt
41+
42+
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].
43+
44+
### Building the docs with Grunt
45+
46+
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:
47+
48+
```
49+
npm install
50+
```
51+
52+
Then, you can build and launch the documentation by running
2753

2854
```bash
2955
grunt docs
3056
```
3157

32-
Which will start up the documentation on port 4000. You will need
33-
[Jekyll][jekyll] installed to build the documentation.
58+
This will start up the documentation on port 4000 ([http://localhost:4000](http://localhost:4000)).
3459

3560
[jekyll]: http://jekyllrb.com/
61+
[jekyll-quickstart]: https://jekyllrb.com/docs/quickstart/
62+
[grunt]: https://gruntjs.com
63+
[grunt-cli]: https://gruntjs.com/getting-started
64+
[nodejs]: https://nodejs.org/en/download/
3665
[select2]: https://select2.github.io
3766
[select2-docs-source]: https://github.com/select2/select2.github.io
3867
[select2-source]: https://github.com/select2/select2

0 commit comments

Comments
 (0)