Statocles::Help::Content - How to use Statocles to write content
version 0.045
This guide describes how to use the statocles command to manage site content, build, test, and deploy the site.
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:
post
$ 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.
EDITOR
$ 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.
build
.statocles-build
$ 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.
daemon
If you edit any content, running build again will update the site. On Mac OS X, editing any content will automatically rebuild the site.
$ 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.
$ 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!
deploy
git push
Doug Bell <preaction@cpan.org>
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.
To install Statocles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statocles
CPAN shell
perl -MCPAN -e shell install Statocles
For more information on module installation, please visit the detailed CPAN module installation guide.