annotate docs/docs/10_publishing.md @ 625:7f95c5e91a31

docs: Add documentation about the `publish` command.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 08 Feb 2016 21:52:46 -0800
parents 95b4e7f9a450
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
383
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 ---
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 title: Publishing
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 ---
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
5 > PieCrust can be used either as a static website generator or as a dynamic CMS.
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
6 > **This section is about using the static generation feature to publish a
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
7 > completely static website**. For how to deploy a PieCrust website as a dynamic
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
8 > CMS, see the [deployment documentation][deploy].
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
9
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
10 To publish your website, you need to "_bake_" it, and then place the output of
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
11 this bake on a public server somewhere.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
12
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
13
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
14 ## Baking
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
15
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
16 When you "_bake_" your website, PieCrust will generate all the pages, posts,
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
17 assets, and other pieces of content you made into simple files on disk. To do
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
18 this, simply run:
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
19
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
20 $ chef bake
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
21
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
22 You should see some information about how many pages PieCrust baked, how much
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
23 time it took to do so, etc. Without any arguments, the output is placed inside
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
24 the `_counter` directory at the root of your website.
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
25
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
26 You can specify another output directory:
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
27
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
28 $ chef bake -o /path/to/my/output
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
29
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
30 For other parameters, refer to the help page for the `bake` command by running
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
31 `chef help bake`.
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
32
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
33 At this point, you only need to copy or upload the output files (everything
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
34 inside `_counter`, or whatever other output directory you specified) to a place
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
35 where people will be able to access them. This is typically a public directory
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
36 on machine that will serve it _via_ HTTP using software like [Apache][] or
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
37 [Nginx][].
496
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
38
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
39
95b4e7f9a450 docs: More generic information about baking and publishing.
Ludovic Chabant <ludovic@chabant.com>
parents: 383
diff changeset
40 ## Publishing
383
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
42 PieCrust is also capable of publishing your website more or less automatically
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
43 for the most common types of setup. This is done with the `publish` command.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
44
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
45 You can specify various "_publish targets_" in your website configuration. By
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
46 default, a target will first bake your website into a temporary directory, and
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
47 then execute some steps that depend on the target type.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
48
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
49 For example, the following configuration has one target (`upload`) that runs
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
50 `rsync` to copy the output of the bake to some web server:
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
51
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
52 ```
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
53 publish:
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
54 upload:
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
55 type: rsync
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
56 destination: user@example.org:/home/user/www
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
57 ```
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
58
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
59 You can then run:
383
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
60
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
61 ```
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
62 $ chef publish upload
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
63 Deploying to upload
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
64 [ 863.1 ms] baked 4 user pages.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
65 [ 5.3 ms] baked 1 theme pages.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
66 [ 79.2 ms] baked 0 taxonomy pages.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
67 [ 84.8 ms] processed 3 assets.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
68 [ 1210.9 ms] Baked website.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
69 building file list ... done
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
70
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
71 sent 29965 bytes received 20 bytes 19990.00 bytes/sec
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
72 total size is 22189128 speedup is 740.01
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
73 [ 991.5 ms] Ran publisher rsync
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
74 [ 2203.3 ms] Deployed to upload
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
75 ```
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
76
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
77 Of course, the output will vary based on your website, your target, whether you
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
78 previously published that target or wiped the PieCrust cache, etc.
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
79
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
80 For more information about the different types of publish targets available in
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
81 PieCrust, refer to the [publishers reference][pubs].
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
82
383
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
83
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
84 [deploy]: {{docurl('deploying')}}
625
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
85 [pubs]: {{docurl('reference/publishers')}}
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
86 [apache]: http://httpd.apache.org/
7f95c5e91a31 docs: Add documentation about the `publish` command.
Ludovic Chabant <ludovic@chabant.com>
parents: 496
diff changeset
87 [nginx]: http://nginx.org/
383
44cf6ce62467 docs: Add lame bit of documentation on publishing your website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
88