Although it’s rare to be off the Internet, it’s important to build a Bootstrap offline document on your computer for emergencies. Without further ado, if you feel the same way, follow these steps:

If you haven’t already installed itnodejsandRuby, please download and install it before starting the following steps.

Go to the Bootstrap website to download the source code.




Download the source code

After downloading, unpack it to any location, such as D:\. Enter the source directory from terminal and enter the command:

npm installCopy the code



npm install

To install a Ruby gem, run the following command from Terminal: Bundler

gem install bundlerCopy the code

If, like me, you encounter an SSL error while installing Bundler, run the following command to reinstall Bundler:

gem sources --remove https://rubygems.org/
gem sources --add http://rubygems.org/Copy the code

If you run into SSL errors while installing Bundler, you may need to modify this step as well: Open the Gemfile file in the source directory, change HTTPS: to HTTP in the first line, and save and close.




Modify the Gemfile

Enter the source directory from terminal and enter the command:

bundler installCopy the code



bundler install

At this point, the installation and configuration of the Bootstrap offline document have been completed. In the future, when you want to view the document, enter the source directory from Terminal and enter the command:

bundler exec jekyll serveCopy the code

Go to http://localhost:9001 to view the offline document.




Launching an offline document