Add some more text to zola init

Closes #773
This commit is contained in:
Vincent Prouillet 2019-08-13 20:15:56 +02:00
parent 8942c15428
commit f0c48b8a14
2 changed files with 7 additions and 4 deletions

View file

@ -3,14 +3,15 @@ title = "CLI usage"
weight = 2
+++
Zola only has 3 commands: init, build and serve.
Zola only has 4 commands: `init`, `build`, `serve` and `check`.
You can view the help of the whole program by running `zola --help` and
the command help by running `zola <cmd> --help`.
## init
Creates the directory structure used by Zola at the given directory.
Creates the directory structure used by Zola at the given directory after asking a few basic configuration questions.
Any choices made during those prompts can easily be changed by modifying the `config.toml`.
```bash
$ zola init my_site

View file

@ -70,10 +70,11 @@ pub fn create_new_project(name: &str) -> Result<()> {
)
}
}
} else {
create_dir(path)?;
}
console::info("Welcome to Zola!");
console::info("Please answer a few questions to get started quickly.");
console::info("Any choices made can be changed by modifying the `config.toml` file later.");
let base_url = ask_url("> What is the URL of your site?", "https://example.com")?;
let compile_sass = ask_bool("> Do you want to enable Sass compilation?", true)?;
@ -87,6 +88,7 @@ pub fn create_new_project(name: &str) -> Result<()> {
.replace("%SEARCH%", &format!("{}", search))
.replace("%HIGHLIGHT%", &format!("{}", highlight));
create_dir(path)?;
create_file(&path.join("config.toml"), &config)?;
create_dir(path.join("content"))?;