annotate docs/docs/02_general/01_chef.md @ 561:624559e72d3b

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