Slovo::Command::Author::generate::novy_dom - Generate database records, files and pages for a new domain


    Usage: slovo generate novy_dom [OPTIONS]
    # Default values.
    slovo generate novy_dom -n
    # Custom values.
    slovo generate novy_dom -n -o краси
    # Do not copy templates nor css files.
    slovo generate novy_dom -n -o краси -s '.*?\.(ep|css)$'
    # Refresh all copied templates from upgraded Slovo
    slovo generate novy_dom -n -o краси -r '.*\.ep$'

    -h, --help    Show this summary of available options
    -n, --name    Mandatory domain name -
    -a, --aliases Domain aliases. Quoted comma separataed string of domain
                  names. Defaults to "www.$name,dev.$name,qa.$name"
    -o, --owner   Username of the owner of this domain in the database.
                  Defaults to "foo".
    -c, --chmod   Octal number used as permissions for folders.
                  Defaults to 0755.
    -s, --skip    A regex. The files matching this regex will not be copied
                  to the domain folder.
    -r, --refresh A regex. Danger! The files matching this regex will be
                  removed, thus allowing files from upgraded Slovo to be copied
                  to the domain folders. This pattern is used after --skip
                  which takes precendence.
                  In case this option is passed, the domain will not be
                  recreated, pages will not be recreated and the admin user
                  will not be updated.


Slovo::Command::Author::generate::novy_dom will make a directory for a new domain under $app->config->{domove_root} (usually $app->home->child('domove')), copy static files and create the root page, and a page "About" for the new domain.

If the owner is not specified it will be set to 'foo'. The foo's password will be changed to a random string and will be displayed to you. The foo user will be enabled for one hour so you can login via the web interface and change ownership of the domain and created pages to another user. This is so for security reasons.

If you use another owner, the owner must exist in the database. Please make sure you have created an owner for the new domain. The owner will be made admin so it can manage the domain. It will be disabled after one hour for security reasons. Set it's stop_date to 0 to prevent this. All domain owners become admins. Please keep the number of admins low.

Sometimes you do not want all files to be copied and just use the common files provided by Slovo or you want to make your own layouts, styles etc. In these cases you can use the --skip option.

Sometimes after upgrading Slovo to a new version you may want or need to update the copied to your domain folder files. In this case you can use the --refresh option. Beware that novy_dom will delete all the files matching the provided pattern. It is recommended to use some version control system like Git for you folder domove to avoid resetting your files by mistake.


Slovo::Command::Author::generate::novy_dom inherits all attributes from Slovo::Command and implements the following new ones.


  my $description = $novy_dom->description;
  $cpanify        = $novy_dom->description('Foo');

Short description of this command, used for the command list.


  my $usage = $novy_dom->usage;
  $cpanify  = $novy_dom->usage('Foo');

Usage information for this command, used for the help screen.


Slovo::Command::Author::generate::novy_dom inherits all methods from Slovo::Command and implements the following new ones.



Run this command.


Slovo,Mojolicious::Command "Adding-commands-to-Mojolicious" in Mojolicious::Guides::Cookbook, Mojolicious::Guides, https://слово.бг.