You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/0.3.x/src/strategies/build-paths.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,12 @@ Note that, like _build state_, this strategy may be invoked at build-time or whi
8
8
9
9
## Usage
10
10
11
-
Here's the same example as given in the previous section (taken from [here](https://github.com/arctic-hen7/perseus/blob/main/examples/showcase/src/templates/post.rs)), which uses _build paths_ together with _build state_ and _incremental generation_:
11
+
Here's the same example as given in the previous section (taken from [here](https://github.com/arctic-hen7/perseus/blob/main/examples/showcase/i18n/templates/post.rs)), which uses _build paths_ together with _build state_:
Note the return type of the `get_build_paths` function, which returns a `RenderFnResult<Vec<String>>`, which is just an alias for `Result<T, Box<dyn std::error::Error>>`, which means that you can return any error you want. If you need to explicitly `return Err(..)`, then you should use `.into()` to perform the conversion from your error type to this type automatically. Perseus will then format your errors nicely for you using [`fmterr`](https://github.com/arctic-hen7/fmterr).
18
+
19
+
Also note how this page renders the page `/docs` by specifying an empty string as one of the paths exported from `get_build_paths`.
Copy file name to clipboardExpand all lines: docs/next/src/strategies/build-paths.md
+4-2
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,12 @@ Note that, like _build state_, this strategy may be invoked at build-time or whi
8
8
9
9
## Usage
10
10
11
-
Here's the same example as given in the previous section (taken from [here](https://github.com/arctic-hen7/perseus/blob/main/examples/showcase/src/templates/post.rs)), which uses _build paths_ together with _build state_ and _incremental generation_:
11
+
Here's the same example as given in the previous section (taken from [here](https://github.com/arctic-hen7/perseus/blob/main/examples/showcase/i18n/templates/post.rs)), which uses _build paths_ together with _build state_:
Note the return type of the `get_build_paths` function, which returns a `RenderFnResult<Vec<String>>`, which is just an alias for `Result<T, Box<dyn std::error::Error>>`, which means that you can return any error you want. If you need to explicitly `return Err(..)`, then you should use `.into()` to perform the conversion from your error type to this type automatically. Perseus will then format your errors nicely for you using [`fmterr`](https://github.com/arctic-hen7/fmterr).
18
+
19
+
Also note how this page renders the page `/docs` by specifying an empty string as one of the paths exported from `get_build_paths`.
0 commit comments