This uses Jigsaw to generate a static site for our documentation.
-
PHP + Composer
Jigsaw needs PHP7 installed on your machine. If you're on Windows, read this.
You also need to have Composer installed.
-
Node.js, NPM, and Git
For Laravel Mix to work (compiling SASS, BrowserSync, etc.), you need to have Node.js and NPM installed on your system. Additionally, for deploying to GitHub, you'll also need Git installed.
-
Clone this repo
Use your preferred Git GUI to clone this repo, or run this in your terminal:
git clone https://github.com/ThemeMountain/docs myFolder
Where
myFolderis the custom folder name in which to clone the repo. This folder will be created relative to the path at which you execute thegit clonecommand in your terminal. If you don't specify a folder name after the repo URL, adocsfolder name will be used (the repo name). -
Install JS dependencies
npm install
Windows note: you might run into an issue with NPM not being able to install
node-sass. This can happen becausenode-sassrequiresnode-gyp, which in turn requires Python. In this case, use Option 1 from here. -
Install PHP dependencies
composer install
If you get an error about
composernot being recognized as a command, make sure~/.composer/vendor/binis in your$PATH. -
Building and Previewing
To build the site when developing locally, run:
npm run dev
To build the production version:
npm run prod
To have Webpack watch for file changes:
npm run watch
This will also run BrowserSync and will open the site in a new tab.
Each documentation lives in its own folder, inside the source folder. All folders in source that do not start with _ will be parsed by Jigsaw.
TBD.