public
Description:
Home | Edit | New

Developing a site with StaticMatic

Setting up a site

The first thing to do with a StaticMatic site is to set up the folders and files ready for use. A simple command will create everything you need to get started:

staticmatic setup my_site

This will set up a number of directories:

  • site/ – contains your static site and any assets such as images or javascript files
  • src/ – where you’ll work on your templates
    • helpers/ – contains any helpers you want to use in your website
    • layouts/ – contains templates that ‘wrap’ your main content pages
    • pages/ – contains the actual pages of content
    • partials/ – contains any "partial pages" that can be reused in other pages or layouts
    • stylesheets/ – contains any Sass stylesheets you want to create

Previewing your site

When you’re ready to start working on your site, you can fire up the preview server to see your changes:

staticmatic preview my_site

This will start a web server on port 3000. Point your web browser to http://localhost:3000 to see your site.

Building your site

When you’re happy with the website, you can tell StaticMatic to generate the HTML pages:

staticmatic build my_site
Last edited by tdreyno, Mon Jul 28 16:05:49 -0700 2008
Home | Edit | New
Versions: