Mercurial > piecrust2
annotate piecrust/resources/helptopics/routes_routes_config.txt @ 1103:6462c4a87532
routes: Make help topic names consistent.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 17 Feb 2018 16:13:32 -0800 |
parents | 07c23be08029 |
children |
rev | line source |
---|---|
1099
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 Routes are specified in the `site/routes` configuration section of your website. This should be a list, where each item is a mapping with the following entries: |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 url: The URL pattern for the route. |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 source: The name of the source this route is for. |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 func (optional): The name of a templating function you can use to generate URLs for this route. |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 The URL pattern typically includes placeholders for information obtained by the source, like a blog post's date and slug. For example: |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 site: |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 routes: |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 - url: /myblog/%year%/%month%/%slug% |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 source: posts |
07c23be08029
help: Add new help topics on routes.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 |
1103
6462c4a87532
routes: Make help topic names consistent.
Ludovic Chabant <ludovic@chabant.com>
parents:
1099
diff
changeset
|
14 To know which placeholders are available, see `chef help routes_params`. |