Skip to content

chaijs/chaijs.github.io

Repository files navigation

chai-docs

The chaijs.com website source code. Contributions welcome.

Quick Start guide

You need to have git, node with npm and ruby with bundler, then - with this repository checked out - you can run the following:

$ make install
$ make

The site should be being served up on http://127.0.0.1:4000/.

Full Instructions

You'll need to have git, node with npm and ruby with bundler. Follow the install instructions here for your operating system:

Installation on Debian Linux

If you're running a debian based distro, run the following command:

$ sudo apt-get install -y git nodejs ruby

The nodejs package on ubuntu is quite old, you probably want a newer version. Consult the documentation for adding the official Node.js PPA

Now you'll need to install bundler for ruby:

$ sudo gem install bundler
Installation on MacOS

Git

Firstly ensure you have git which comes with the XCode Command Line Tools. You can run the following command:

$ xcode-select --install

You should now have git, you can check by running

$ git --version
git version 2.20.1

Node

If you have homebrew, you can simply run brew install node. Otherwise you'll need to vist the node.js site and download the Node.js installer. Node ships with npm by default, so you should find that when you run node -v and npm -v on the command line, you get some output like this:

$ node -v
11.1.0
$ npm -v
6.4.1

Ruby

Ruby comes installed by default on MacOS. However bundler does not. To install bundler, run the following:

$ sudo gem install bundler

Now you should have bundler, you can check by running:

$ bundler -v
Bundler version 2.0.1

Cloning the repository

To clone the website to your local machine, run the following:

$ git clone https://github.com/chaijs/chaijs.github.io

It will generate a folder named chaijs.github.io, from within that directory, you can run make install to download the dependencies:

$ make install

Read the logs carefully, you might notice a message saying:

Following files may not be writable, so sudo is needed:
  ...

If you see this message, you can opt to run sudo make install - or alternatively run the steps manually:

$ sudo bundle install
$ npm install

Running the server

The server can be run using the bare make command, like so:

$ make

This command is shorthand for the following two commands:

$ make generated_data
$ make docs-server

make docs-server will run the jekyll web server, which hosts the website on http://127.0.0.1:4000/. You should be able to visit this URL and see a local copy of the chaijs website running.

About

The chaijs.com website source code. Contributions welcome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published