Mercurial > piecrust2
comparison docs/docs/02_general/01_chef.md @ 251:f250e3c486e4
docs: Add some general information on `chef`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 21 Feb 2015 08:19:14 -0800 |
parents | |
children | 13987668311c |
comparison
equal
deleted
inserted
replaced
249:f1e8ed3ea141 | 251:f250e3c486e4 |
---|---|
1 --- | |
2 title: Chef | |
3 --- | |
4 | |
5 Running commands is done through the `chef` program. You can type `chef --help` | |
6 and get the complete list of commands and options. | |
7 | |
8 ## Commands | |
9 | |
10 The most common commands are: | |
11 | |
12 * `init`: This is the command that creates a new website. All it does really is | |
13 create a new directory with a `config.yml` file in it. For more information, | |
14 see the [Website Structure][1] page. | |
15 | |
16 * `prepare`: Creating and editing text files is easy enough, but it can be even | |
17 easier if you have a command to name the file for you -- especially for blog | |
18 posts which often require today's date in their name. The `prepare` command | |
19 can create a variety of content, but `prepare page` and `prepare post` are the | |
20 most common usage. More more information, see [Creating Pages][2]. | |
21 | |
22 * `serve`: Previewing your website locally as you work on it is made possible by | |
23 PieCrust's built-in web server. After running the `serve` command, your | |
24 website will be reachable at `http://localhost:8080`. Hitting `<F5>` to | |
25 refresh the page is all you need to see updated content as you edit it. | |
26 | |
27 * `bake`: Finally, the `bake` command transforms all your content -- pages, | |
28 templates, layouts, assets -- into a self-contained static website that you | |
29 can upload to your public server. | |
30 | |
31 [1]: {{docurl('general/website-structure')}} | |
32 [2]: {{docurl('content/creating-pages')}} | |
33 | |
34 | |
35 ## Global options | |
36 | |
37 The `chef` accepts various global options that can be useful in advanced | |
38 scenarios: | |
39 | |
40 * `--root <dir>` lets you specify the root directory of a website in which to | |
41 run the command. This means you don't need to change the current working | |
42 directory to that website, which can be necessary for scripting, for instance. | |
43 | |
44 * `--config <name>` lets you specify a *configuration variant* to apply before | |
45 running the command. A *configuration variant* is a fragment of website config | |
46 that lets you override what's defined normally in `config.yml`. For more | |
47 information, see the [website configuration][3] page. | |
48 | |
49 [3]: {{docurl('general/website-config')}} | |
50 | |
51 | |
52 ### Logging | |
53 | |
54 Several global options relate to logging: | |
55 | |
56 * `--quiet` will make PieCrust only print out very important messages | |
57 or errors. | |
58 | |
59 * `--debug` does the opposite, making PieCrust print lots of | |
60 debugging information, including stack traces when errors occur -- which is | |
61 useful for troubleshooting a problem. | |
62 | |
63 * `--log` lets you log to a file. The complementary `--log-debug` lets you log | |
64 debug information (like `--debug`) but only to the log file, which reduces | |
65 spam in the console. | |
66 | |
67 |