Skip to content

Path parameters for custom pages #944

@simonw

Description

@simonw

Custom pages let you e.g. create a templates/pages/about.html page and have it automatically served at /about.

It would be useful if these pages could capture path patterns. I like the Python format string syntax for this (also used by Starlette): /foo/bar/{slug}.

So... how about embedding those patterns in the filenames themselves?

templates/pages/museums/{slug}.html

Would capture any hits to /museums/something and use that page to serve them.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions