Skip to content

Commit 4fba346

Browse files
committed
Updated docs
1 parent f5c5a04 commit 4fba346

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/guides/pages.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Easily create static and dynamic pages with a layout.
77

88
## Dynamic pages
99

10-
Pages use the [jinjapy](https://github.com/hyperflask/jinjapy) file format. It combines python code and a [jinja template](#the-page-template). The python code will be executed first on every request, then the template will be rendered.
10+
Pages use the [jinjapy](https://github.com/hyperflask/jinjapy) file format. It combines python code and a [jinja template](#the-page-template). The python code will be executed first on every request, then the template will be rendered. The python code is enclosed inside 2 lines containing 3 dashes "---".
1111

12-
The python code is enclosed inside 2 lines containing 3 dashes "---"
12+
Create new pages in the `app/pages` folder using the `.jpy` extension.
1313

1414
A special [page object](#the-page-object) is available in the python code. Assign values to this object so that they become available in the template.
1515

@@ -53,13 +53,13 @@ All formats can have a YAML frontmatter defining variables that will be injected
5353

5454
The URL rule is constructed using the following rules:
5555

56-
- `index.ext` file are roots
56+
- `index.jpy` file are roots
5757
- folder hierarchy are transformed to url paths:
58-
- `posts/release-annoucement.ext` converts to `/posts/release-annoucement`
59-
- `posts/index.ext` converts to `/posts`
60-
- `folder/subfolder/page.ext` converts to `/folder/subfolder/page`
58+
- `posts/release-annoucement.jpy` converts to `/posts/release-annoucement`
59+
- `posts/index.jpy` converts to `/posts`
60+
- `folder/subfolder/page.jpy` converts to `/folder/subfolder/page`
6161
- placeholders are allowed in filenames:
62-
- `posts/<slug>.ext` converts to `/posts/<slug>`
62+
- `posts/<slug>.jpy` converts to `/posts/<slug>`
6363

6464
The placeholder value is available through the [`page` object](#the-page-object) (eg: `page.slug`).
6565

0 commit comments

Comments
 (0)