Building the Documentation

Now that you're all set up and you've commented your code, you just need to run Natural Docs.  The command to build your documentation is just NaturalDocs.exe plus the project configuration folder:

NaturalDocs.exe C:\My Project\ND Config

When it's done, go to the output folder you put in Project.txt and open index.html.  That's it, you have your documentation!

Keeping It Updated

Any time you want to update your documentation, just run the same command again:

NaturalDocs.exe C:\My Project\ND Config

If you already had it open in a browser window, just reload the page and you'll see the changes.

Natural Docs' build process is differential, which means each run it looks for what changed since its last run and then updates only those parts of the documentation.  This means that later runs are much faster than the first so you can run it often as you work.

Since Natural Docs is a command line tool it can be integrated into most development environments.  You can add it as a pre- or post-build event in your build process, but I personally configure it as an external tool in Visual Studio so I can run it whenever I want with a keyboard shortcut, even between builds.  Most other development environments should have a similar feature.

Since Natural Docs writes to the console most development environments can capture its status messages and display it themselves.  However, if you have it run in a pop-up console window there's a couple of command line options you may want to know about.  --pause-before-exit will tell Natural Docs to wait for a key press before exiting so you have time to see the status messages before the window disappears.  --pause-on-error also does this, but only when there's a problem.  The window will stay open so you can see the error message but will close automatically when everything's fine.