docs: improve grammar (#362)
This commit is contained in:
@@ -38,8 +38,8 @@ To define a handler, one needs to export a `handler` function or object from the
|
||||
route module. If the handler is an object, each key in the object is the name of
|
||||
the HTTP method that the handler should be called for. For example the `GET`
|
||||
handler above is called for `GET` requests. If the handler is a function, it is
|
||||
called for all requests regardless of the method. If a HTTP method does not have
|
||||
a corresponding handler, a 405 HTTP error is returned.
|
||||
called for all requests regardless of the method. If an HTTP method does not
|
||||
have a corresponding handler, a 405 HTTP error is returned.
|
||||
|
||||
Now, let's render some HTML using the route component:
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ File names are mapped to route patterns as follows:
|
||||
- Paths where the last path segment follows the structure `[...<ident>]` are
|
||||
treated as having a wildcard suffix.
|
||||
|
||||
Here is a table of file names, and which route patterns they map to, and which
|
||||
paths they might match:
|
||||
Here is a table of file names, which route patterns they map to, and which paths
|
||||
they might match:
|
||||
|
||||
| File name | Route pattern | Matching paths |
|
||||
| ------------------------- | ---------------------- | -------------------------- |
|
||||
|
||||
@@ -9,7 +9,7 @@ on the file extension of the file on disk. Assets are also automatically
|
||||
streamed from disk to the client to improve performance and efficiency for both
|
||||
user and server.
|
||||
|
||||
Fresh also adds an `etag` header to assets automatically, and handles the
|
||||
Fresh also adds an `etag` header to assets automatically and handles the
|
||||
`If-None-Match` header for incoming requests.
|
||||
|
||||
### Caching
|
||||
@@ -19,7 +19,7 @@ in many scenarios, so fresh makes it easy to serve assets with long cache
|
||||
lifetimes too.
|
||||
|
||||
The first approach to do this is manual. The client runtime exports an `asset`
|
||||
function that takes an absolute path to the static asset, and returns a "locked"
|
||||
function that takes an absolute path to the static asset and returns a "locked"
|
||||
version of this path that contains a build ID for cache busting. When the asset
|
||||
is requested at this "locked" path, it will be served with a cache lifetime of
|
||||
one year.
|
||||
|
||||
Reference in New Issue
Block a user