Skip to content

Commit

Permalink
A few additional tweaks to Roda docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Jan 12, 2025
1 parent c2663fb commit 7647aa2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridgetown-website/src/_docs/roda.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RodaApp < Roda
end
```

The `r.bridgetown` method call spins up Bridgetown's own routing system which is comprised of subclasses of `Bridgetown::Rack::Routes`—or if the `bridgetown-routes` plugin is active, file-based routing (in `src/_routes`) as well.
The `r.bridgetown` method call spins up Bridgetown's own routing system which is comprised of subclasses of `Bridgetown::Rack::Routes`and if the `bridgetown-routes` plugin is active, file-based routing (in `src/_routes`) as well.

The `bridgetown_server` plugin configures the following Roda plugins:

Expand All @@ -38,13 +38,13 @@ We also load our custom `ssg` plugin which is loosely based on Roda's `public` p
* `/path/to/page` -> `/path/to/page.html` or `/path/to/page/index.html`
* `/path/to/page/` -> `/path/to/page/index.html`

The `bridgetown_ssr` plugin configures these additional plugins:
If you add `init :ssr` to your [Initializers](/docs/configuration/initializers) config, the `bridgetown_ssr` plugin is loaded which configures these additional plugins:

* [all_verbs](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/AllVerbs.html) - adds routing methods for additional HTTP verbs like PUT, PATCH, DELETE, etc.
* [cookies](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/Cookies.html) - adds response methods for setting or deleting cookies, default path is root (`/`)
* [indifferent_params](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/IndifferentParams.html) - lets you access request params using symbols in addition to strings, and also provides a `params` instance method (no need to use `r.`)
* [route_csrf](https://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/RouteCsrf.html) - this helps protect against cross-site request forgery in form submissions
* [custom_block_results](https://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/CustomBlockResults.html) - lets Roda route blocks return arbitrary objects which can be processed with custom handlers. We use this to enable our `RodaCallable` functionality
* [custom_block_results](https://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/CustomBlockResults.html) - lets Roda route blocks return arbitrary objects which can be processed with custom handlers. We use this to enable our [RodaCallable](/docs/routes#callable-objects-for-rendering-within-blocks) functionality
* `method_override` - this Bridgetown-supplied plugin looks for the presence of a `_method` form param and will use that to override the incoming HTTP request method. Thus even if a form comes in as POST, if `_method` equals `PUT` the request method will be `PUT`.

If you pass `sessions: true` to the `ssr` initializer in your config, you'll get these plugins added:
Expand Down

0 comments on commit 7647aa2

Please sign in to comment.