
### Generated by Statocles version <%= $Statocles::VERSION %>

# This is the site configuration file. The format is YAML, and the config is
# read by Beam::Wire, a dependency-injection library that builds complete
# objects. For full details on how to edit this file, see
# Statocles::Help::Config.
#
# This file contains configuration for objects. Each object has a name, like
# "site", "theme", or "blog_app". This name can be used to refer to the object
# later, for example, using "$ref: name".
#
# Every object has a "class". Developers can customize behavior by changing the
# class or creating their own classes. If you need help with an object, look at
# the class's documentation.
#
# Every object has "args", which are the object's attributes. See the class's
# documentation for a full list of attributes and what they do.
#
# Many objects have events. Event handlers can be configured using the "on"
# key. See the class's documentation for a list of possible events. Every
# event handler should have at least "$class" and a "$sub". "$class" is the
# plugin class. "$sub" is the plugin method to run. If necessary, you can
# add "$args" to configure the plugin object.

# site: This is the main site object. Site objects handle building and
# deploying, and store global site data like themes and navigation. See
# Statocles::Site for a full list of attributes and what they do.
site:
    class: 'Statocles::Site'

    args:

        # title: This is the title of the site, shown in the <title> tag
        title: 'My Statocles Site'

        # base_url: This is the base URL the site will be deployed to. It
        # should be a full URL, and may contain a path, like:
        #
        #   http://example.com/username
        #
        # If the base_url contains a path, all internal links will be
        # rewritten appropriately.
        base_url: '<%= $site->{base_url} %>'

        # apps: These are the applications in this site. The name of the app,
        # "blog", "page", or "static", is used to refer to it in commands.
        apps:

            # blog: This is the blog app
            blog:
                $ref: 'blog_app'

            # page: This app turns any Markdown page into HTML
            page:
                $ref: 'page_app'

            # static: This app does no processing at all. Good for images
            static:
                $ref: 'static_app'

        # plugins: These are plugins that can add features and alter the
        # content of the site.
        plugins:
            link_check:
                $class: 'Statocles::Plugin::LinkCheck'

        # theme: The theme builds and manages the templates. Use themes to
        # change how your site looks.
        theme:
            $ref: 'theme'

        # index: The path to the page that should be used for the site index.
        index: '<%= $site->{index} %>'

        # nav: These are lists of navigation links used by the theme.
        # Navigations are used to move between applications, or to go to
        # specific, important pages.
        #
        # The "main" nav is the primary navigation for the site. Every theme
        # should have this one.
        #
        # Each nav consists of an array of links. See the Statocles::Link class
        # for a list of attributes and what they mean. The most important are
        # "text", the text of the link, and "href", the URL to link to.
        nav:
            main:
                % for my $link ( @{ $site->{nav}{main} // [] } ) {
                - text: '<%= $link->{text} %>'
                  href: '<%= $link->{href} %>'
                % }

        # deploy: This is the deploy object, used to deploy this site.
        deploy:
            $ref: 'deploy'

# theme: These are the settings for the theme.  See Statocles::Help::Theme for
# more information, and Statocles::Theme for a full list of attributes and what
# they do
theme:
    class: 'Statocles::Theme'
    args:
        # store: The store points to the directory where the theme's
        # templates are kept. Under-the-hood, this is a Statocles::Store
        # object.
        #
        # Themes have a special syntax to refer to themes that come bundled with
        # Statocles. See Statocles::Help::Theme for more information
        store: '<%= $theme->{args}{store} %>'

# deploy: These are the settings for the site's deploy. See Statocles::Deploy::File
# for a full list of attributes and what they do.
deploy:
    class: '<%= $deploy->{class} %>'
    args:
        % for my $k ( keys %{ $deploy->{args} } ) {
        <%= $k %>: '<%= $deploy->{args}{$k} %>'
        % }

#----------------------------------------------------------------------------
# Applications
#----------------------------------------------------------------------------
#
# All applications have a "url_root" attribute, which is the root URL of the
# app. All the app's pages will be under this URL.
#
# Most applications have a "store" attribute. The store points to the directory
# where the application's data is kept. Under-the-hood, this is a
# Statocles::Store object, but you only need to specify the directory path.

# blog_app: These are the settings for the blog application.
blog_app:
    class: 'Statocles::App::Blog'
    args:
        url_root: '/blog'
        store: 'blog'

# page_app: These are the settings for the page application.
page_app:
    class: 'Statocles::App::Basic'
    args:
        store: 'page'
        url_root: '/page'

# static_app: These are the settings for the static application.
static_app:
    class: 'Statocles::App::Basic'
    args:
        store: 'static'
        url_root: '/static'
