Mercurial > piecrust2
annotate docs/pages/getting-started.md @ 380:f33712c4cfab
routing: Fix bugs with matching URLs with correct route but missing metadata.
When matching a route like `/foo/%slug%` against an URL like `/foo`, the route
will (correctly) return a match, but it will be completely missing the `slug`
metadata, resulting in problems elsewhere. This change makes it so that any
missing route metadata will be filled in with an empty string.
And because this means generated URLs may differ from the incoming URL when
using trailing slashes (`/foo/` _vs._ `/foo`), we make the assert in the
chef server handle those discrepancies.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 10 May 2015 00:34:21 -0700 |
parents | 26e59f837558 |
children | 1970e7e3a18e |
rev | line source |
---|---|
243
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 --- |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 title: Getting Started |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 header_class: tutorial |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 --- |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 This quick tutorial will show you how to create a simple blog with PieCrust. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 > If you're already an experienced cook, here's the rundown: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 > |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 > virtualenv pcenv |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 > <activate pcenv> |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 > pip install piecrust |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 > chef init mywebsite |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 > cd mywebsite |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 > chef prepare post my-first-post |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 > chef serve |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 > chef bake |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
18 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
19 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 ## Installation |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
22 The first step is obviously to get PieCrust installed on your machine. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
23 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
24 You'll need Python 3.4 at least for this. Note that it can live side by side |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
25 with Python 2.x. On Windows or MacOSX, you can use the [official Python |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
26 installer][1]. On main Linux distros, you can use your system's package manager |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 to install it. If you're on a more obscure system, or if you want to use |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
28 alternative means like Homebrew or something, you probably don't need help for |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 this! |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
30 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
31 Now we can start running in a command line. On MacOSX, that's the Terminal app, |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 and on Windows that's the Command Prompt. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
33 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
34 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 ### Global installation |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
37 Python 3 comes with a [package manager][2] called `pip`, with which you can install, |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
38 update, and uninstall Python programs like PieCrust. Just run: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
39 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
40 pip install piecrust |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
41 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
42 This will install PieCrust globally on your system. You may want to install it |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
43 using a *virtual environment* instead, though. See the next section for that. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
44 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
45 > #### Permission Errors |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
46 > |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
47 > If you get some permission errors, you may have to run that command as an |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
48 > administrator. That would be `sudo pip install piecrust` on MacOSX and Linux, or |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
49 > running the Command Prompt as an Administrator on Windows. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
50 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
51 You should now have PieCrust installed! You can check that it works by typing: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
52 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
53 chef --version |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
54 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
55 If everything's fine it should print `{{piecrust.version}}` (the latest |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
56 version as of this writing). |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
57 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
58 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
59 ### Using virtual environements |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
60 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
61 Although very straightforward, the previous section installs PieCrust globally |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
62 on your system. This may be OK, but could also cause problems if you have other |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
63 Python software that share dependencies with PieCrust, but with different |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
64 versions. And then there's the issue of installing PieCrust in environments in |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
65 which you don't have administrator access. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
66 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
67 Thankfully, `pip` supports a whole variety of scenarios, and [another |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
68 utility][3], called `virtualenv` enables even more of them. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
69 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
70 * If you don't have it yet, install `virtualenv` with `pip install |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
71 virtualenv`, or check with your administrators to have it. Most web hosts |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
72 provide it. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
73 * Run `virtualenv pcenv`. This will create a directory called `pcenv` that |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
74 contains a whole new Python environment, separate from your system's Python |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
75 environment. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
76 * Activate that environment with `sh pcenv/bin/activate.sh` (on Linux or |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
77 MacOSX) or `pcenv\Scripts\activate` (on Windows). The new environment will |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
78 now be active for as long as your current command prompt is active. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
79 * Now install PieCrust with `pip install piecrust`. This will install it in |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
80 that environment, leaving your system's Python clean of any of PieCrust's |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
81 dependencies. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
82 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
83 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
84 ## Create an empty website |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
85 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
86 The `chef` command is the main PieCrust utility. You can read about it on the |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
87 [command-line overview][cmdline] page. The first thing to do is to ask it to |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
88 create a basic website structure: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
89 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
90 chef init mywebsite |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
91 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
92 This should create a directory called `mywebsite`. There should be a |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
93 `config.yml` file in there. Get into that directory: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
94 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
95 cd mywebsite |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
96 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
97 Once you're inside a website's root directory, the `chef` command will be able |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
98 to do a lot of different things. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
99 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
100 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
101 ## Create new content |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
102 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
103 Let's start by creating a new page: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
104 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
105 chef prepare page about-me |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
106 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
107 It will tell you that it just created a file named `pages/about-me.md`. Go ahead |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
108 and edit that in your favorite text editor, and write some text, or change the |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
109 title that was defined for you in the header part. For more information on |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
110 writing content, see the documentation about [creating pages][cnt]. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
111 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
112 Now let's write a blog post: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
113 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
114 chef prepare post my-new-blog |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
115 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
116 It will again tell you about the file it just created. This time it's in the |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
117 `posts` folder, and has a name that follows some date/title kind of naming |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
118 convention. You don't have to use `chef prepare` to create content for your |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
119 website, but for things like blog posts it's a lot easier to let it insert |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
120 today's date in the filename. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
121 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
122 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
123 ## Preview content |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
124 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
125 Time to preview what we just did! Simply type: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
126 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
127 chef serve |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
128 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
129 Open your favorite web browser and navigate to the URL that `chef` is listening |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
130 on, which by default is `localhost:8080`. You should see some placeholder text |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
131 along with today's blog post that you just created, with a simple barebones theme. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
132 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
133 > #### Alternate port |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
134 > |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
135 > If you already have some other things running on port 8080, you can tell |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
136 > PieCrust to use a different one with the `-p` option. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
137 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
138 The `about-me` page isn't shown because you're looking at the index page, but |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
139 you would see it if you navigated to `localhost:8080/about-me`. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
140 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
141 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
142 ## Bake and publish |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
143 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
144 Now it's time to bake this new site and publish it somewhere. There are many |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
145 ways to do that, as shown in the documentation about [baking][bake], but here's |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
146 a quick way. Run: |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
147 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
148 chef bake |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
149 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
150 This will bake the website into static files, stored under the `_counter` |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
151 directory. At this point, you can upload all the contents of that directory to |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
152 your web server. When that's done, you should be able to see the exact same |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
153 website being served from there. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
154 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
155 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
156 That's it! This is an extremely quick tour of PieCrust. Read the |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
157 [documentation][doc] to learn more. |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
158 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
159 |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
160 [1]: https://www.python.org/downloads/ |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
161 [2]: https://pip.pypa.io/en/latest/ |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
162 [3]: https://virtualenv.pypa.io/en/latest/ |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
163 [doc]: {{pcurl('docs')}} |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
164 [cmdline]: {{pcurl('docs/general/command-line-overview')}} |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
165 [cnt]: {{pcurl('docs/content/creating-pages')}} |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
166 [bake]: {{pcurl('docs/publish')}} |
26e59f837558
docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
167 |