Skip to content

Commit

Permalink
docs: fixed some broken links
Browse files Browse the repository at this point in the history
Closes #149.
  • Loading branch information
arctic-hen7 committed Jun 8, 2022
1 parent 873562c commit 5a0e107
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/0.3.0-0.3.3/en-US/server-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Of course, a much simpler way of doing the above would be to make the database n

## The Perseus Server

Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](/docs/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update.
Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](:ejecting), which can be brittle, because you'll have to redo everything every time there's a major update.

## Your Own Server

Expand Down
2 changes: 1 addition & 1 deletion docs/0.3.4/en-US/reference/index-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ Perseus' index view is very versatile, but there are a few things you HAVE to in
2. You need a `<body>`. This needs to be defined as `<body></body>`, for similar reasons to the `<head>`.
3. You need a `<div id="root"></div>`. Literally, you need that *exact* string in your index view, or Perseus won't be able to find your app at all! Now, yes we could parse the HTML fully and find this by ID, or we could just use string replacement and reduce dependencies and build time. Importantly, you can't use this directly is you use `.index_view()` and provide Sycamore code, as Sycamore will add some extra information that stuffs things up. Instead, you should use `perseus::PerseusRoot`, which is specially designed to be a drop-in entrypoint for Perseus. It should go without saying that you need to put this in the `<body>` of your app.

*Note: you don't need the typical `<!DOCTYPE html>`in your index view, since that's all Perseus targets, so it's added automatically. If, for some magical reason, you need to override this, you can do so with a [control plugin](reference/plugins/control).*
*Note: you don't need the typical `<!DOCTYPE html>`in your index view, since that's all Perseus targets, so it's added automatically. If, for some magical reason, you need to override this, you can do so with a [control plugin](:reference/plugins/control).*
2 changes: 1 addition & 1 deletion docs/0.3.4/en-US/reference/server-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Of course, a much simpler way of doing the above would be to make the database n

</details>

Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](/docs/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!
Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](:reference/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!

Instead, it's recommended that you create a server separate from Perseus that you control completely. You might do this with [Actix Web](https://actix.rs) or similar software. You could even set up serverless functions on a platform like [AWS Lambda](https://aws.amazon.com/lambda), which can reduce operation costs.

Expand Down
4 changes: 2 additions & 2 deletions docs/0.4.x/en-US/reference/index-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In most Perseus apps, you can just ofcus on building your app's templates, and l
However, if you're using Perseus, you probably don't want to be writing HTML right? You're supposed to be using Sycamore! Well, that's completely true, and so Perseus supports creating an index view with Sycamore code! You can do this like so:

```rust
TODO example
{{#include ../../../examples/core/index_view/src/lib.rs}}
```

Note that you can also use `.index_view_str()` to provide an arbitrary HTML string to use instead of Sycamore code.
Expand All @@ -20,4 +20,4 @@ Perseus' index view is very versatile, but there are a few things you HAVE to in
2. You need a `<body>`. This needs to be defined as `<body></body>`, for similar reasons to the `<head>`.
3. You need a `<div id="root"></div>`. Literally, you need that *exact* string in your index view, or Perseus won't be able to find your app at all! Now, yes we could parse the HTML fully and find this by ID, or we could just use string replacement and reduce dependencies and build time. Importantly, you can't use this directly is you use `.index_view()` and provide Sycamore code, as Sycamore will add some extra information that stuffs things up. Instead, you should use `perseus::PerseusRoot`, which is specially designed to be a drop-in entrypoint for Perseus. It should go without saying that you need to put this in the `<body>` of your app.

*Note: you don't need the typical `<!DOCTYPE html>`in your index view, since that's all Perseus targets, so it's added automatically. If, for some magical reason, you need to override this, you can do so with a [control plugin](reference/plugins/control).*
*Note: you don't need the typical `<!DOCTYPE html>`in your index view, since that's all Perseus targets, so it's added automatically. If, for some magical reason, you need to override this, you can do so with a [control plugin](:reference/plugins/control).*
2 changes: 1 addition & 1 deletion docs/0.4.x/en-US/reference/server-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Of course, a much simpler way of doing the above would be to make the database n

</details>

Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](/docs/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!
Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](:reference/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!

Instead, it's recommended that you create a server separate from Perseus that you control completely. You might do this with [Actix Web](https://actix.rs) or similar software. You could even set up serverless functions on a platform like [AWS Lambda](https://aws.amazon.com/lambda), which can reduce operation costs.

Expand Down
2 changes: 1 addition & 1 deletion docs/next/en-US/reference/server-communication.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Of course, a much simpler way of doing the above would be to make the database n

</details>

Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](/docs/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!
Perseus has an inbuilt server that serves your app and its data, and this can be extended by your own code. However, this requires [ejecting](:reference/ejecting), which can be brittle, because you'll have to redo everything every time there's a major update. This is NOT the recommended approach for setting up your backend!

Instead, it's recommended that you create a server separate from Perseus that you control completely. You might do this with [Actix Web](https://actix.rs) or similar software. You could even set up serverless functions on a platform like [AWS Lambda](https://aws.amazon.com/lambda), which can reduce operation costs.

Expand Down

0 comments on commit 5a0e107

Please sign in to comment.