The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Statocles::Help::Content - How to use Statocles to write content

VERSION

version 0.045

DESCRIPTION

This guide describes how to use the statocles command to manage site content, build, test, and deploy the site.

Create A Blog Post

Remember when we gave our blog app a name? Now we can use that name to access the blog's command-line commands. To create a new blog post, we can use the post command:

    $ statocles blog post My First Post
    New post at: blog/2014/06/04/my-first-post.markdown

Everything after post will be used as the title of the post.

If you have the EDITOR environment variable set, your editor will automatically open on the newly-created document.

Build The Site

    $ statocles build

Running the build command will write all our pages to the .statocles-build directory. We can open up this directory and look at the files to make sure that our deploy will be correct.

Test The Site

    $ statocles daemon
    Listening on http://*:3000

Run the daemon command to start an HTTP server to view your built site. This will automatically build the site, so if you forgot to run build, don't worry.

If you edit any content, running build again will update the site. On Mac OS X, editing any content will automatically rebuild the site.

Commit Your Changes

    $ git add blog/2014/06/04/my-first-post.markdown
    $ git commit -m'My first post'

Once the build looks good, we'll want to commit our changes. The major feature of having a website in a git repository is change tracking.

Deploy The Site

    $ statocles deploy

Running the deploy command will, in the case of the Git deploy, commit the updated pages to the Git repository. deploy will try to do a git push automatically, so your changes are now live on Github Pages!

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.