Skip to content

Commit

Permalink
Link rather than duplicate Ruby on Rails setup steps
Browse files Browse the repository at this point in the history
Tweak the Free and Pro copy
  • Loading branch information
kangaree committed Oct 30, 2024
1 parent 430969a commit 0764da4
Showing 1 changed file with 8 additions and 42 deletions.
50 changes: 8 additions & 42 deletions playbook-website/app/views/guides/getting_started/font_awesome.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,11 @@ Integrating Font Awesome with Playbook ensures that you have access to these ben

**Make sure you are on Rails 7 or higher.**

**1.** Create your new app
**1.** Follow the [Ruby on Rails Setup getting started page](/guides/getting_started/ruby_on_rails_setup) to setup Playbook with your Rails project.

```sh
rails new CoolNewApp
```

**2.** Add the sassc-rails gem as [outlined by Rails docs](/guides/getting_started/ruby_on_rails_setup) & add our playbook_ui ruby gem inside your Gemfile.

```rb
# app/Gemfile
gem "sassc-rails"
gem "playbook_ui"
```
**2.** Setup Pro or Free Font Awesome to use our Icon Component.

**3.** Add the View Helper to enable Rails Kits

```rb
# app/controllers/application_controller.rb
helper Playbook::PbKitHelper
```

**4.** Import the Playbook Kit Styles

```rb
# app/assets/stylesheets/application.scss
@import "playbook";
```

or be selective:

```rb
# app/assets/stylesheets/application.scss
@import "tokens/index";
@import "pb_body/body";
```

**5.** Setup Pro or Free Font Awesome to use our Icon Component.

*Free Users: currently only [Free Regular](https://fontawesome.com/search?o=r&m=free&s=regular) icons are supported in our icon component structure.*

Pro:
**Pro:**

```rb
# app/assets/stylesheets/application.scss
Expand All @@ -78,7 +42,9 @@ Pro:
end
```

Free:
**Free:**

*Currently only [Free Regular](https://fontawesome.com/search?o=r&m=free&s=regular) icons are supported in our icon component structure.*

```rb
# app/assets/stylesheets/application.scss
Expand All @@ -92,13 +58,13 @@ Free:
end
```

**6.** Bundle all the things!
**3.** Bundle all the things!

```sh
bundle install
```

**7.** **Go build awesome stuff!**
**4.** **Go build awesome stuff!**

Refer to our [Icon kit](/kits/icon) to get started with Font Awesome icons in Playbook.

Expand Down

0 comments on commit 0764da4

Please sign in to comment.