Skip to content

Commit

Permalink
fix links about Streamlined
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite committed Nov 18, 2024
1 parent 85d49b7 commit e3cbd4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bridgetown-website/src/_docs/components/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Bear in mind that Ruby components aren't accessible from Liquid templates. So if

## Use Bridgetown::Component for Template Rendering

By subclassing `Bridgetown::Component`, you gain [the ability to write a template](/docs/templates/erb-and-beyond) in ERB, Serbea, or Streamlined.
By subclassing `Bridgetown::Component`, you gain [the ability to write a template](/docs/template-engines/erb-and-beyond) in ERB, Serbea, or Streamlined.

For template engines like ERB, add a template file right next to the component's `.rb` file. The template will automatically get rendered by the component (and you won't need to define a `render_in` method yourself). For example, using ERB:

Expand Down Expand Up @@ -73,7 +73,7 @@ Here's the same example using Serbea template syntax:
</field-component>
```

Rendering out the component in a parent template and passing along arguments is straightforward:
Rendering out the component in a parent template and passing along arguments looks like this:

```erb
<%%= render FieldComponent.new(type: "email", name: "email_address", label: "Email Address") %>
Expand Down Expand Up @@ -109,6 +109,8 @@ end

Streamlined adds some special helpers so that writing properly-escaped HTML as well as rendering out a hash as attributes or looping through an array is much easier than with plain heredoc syntax. We've found that for complex interplay between Ruby & HTML code, Streamlined is easier to deal with than either ERB or Serbea.

[Read more about how to use Ruby template syntax here.](/docs/template-engines/erb-and-beyond)

<%= render Note.new do %>
Need to add component compatibility with Rails projects? [Try our experimental ViewComponent shim](/docs/components/view-component).
<% end %>
Expand Down

0 comments on commit e3cbd4c

Please sign in to comment.