Generating the Site
lsg-quickstart-generate
Now that you have your first page, you can generate the site for the first time. Open up a terminal in your project's directory and run:
Now that you have your first page, you can generate the site for the first time. Open up a terminal in your project's directory and run:
This will generate your Style Guide's site in the
styleguide
directory.Simple Command
If you want an easier way to run this command, first install DocumentJS globally (so it can be run anywhere on your computer):
Now you can just run this command in any directory with a
documentjs.json
file:Viewing your Site
Now you just need a way to host your generated site from
styleguide
. If you're not sure how to do this and are on a Windows computer, you'll need to research it on your own. If you are using a Mac or a Linux machine, use a terminal navigate to thestyleguide
directory and use python to start a server:You should see something like the following:
Open up a browser and navigate to
http://localhost:8000
(if the number above is not 8000, use whatever number you see in your terminal instead). You should see the page you just created!Automatically Detecting Changes
If you'd like DocumentJS to rebuild the site every time you make changes, you can use the
-w
(watch) flag while you're working on the site so you don't have to run thedocumentjs
command every time:Next Page