2013-05-03 08:12:33 +08:00
---
layout: base
2013-05-06 03:34:00 +08:00
title: Get Started with Font Awesome
navbar_active: get-started
2013-05-09 11:15:29 +08:00
relative_path: ../
2013-05-03 08:12:33 +08:00
---
2013-10-21 07:12:13 +08:00
{% capture jumbotron_h1 %}< i class = "fa fa-cogs" > < / i > Get Started{% endcapture %}
2013-05-24 04:22:45 +08:00
{% capture jumbotron_p %}Easy ways to get Font Awesome {{ site.fontawesome.version }} onto your website{% endcapture %}
2013-05-03 08:12:33 +08:00
{% include jumbotron.html %}
{% include stripe-social.html %}
< div class = "container" >
2013-10-20 03:20:03 +08:00
{% capture stripe_ad_content %}
< p class = "lead" >
Setting up Font Awesome can be as simple as adding two lines of code to your website, or you can be a pro and
customize the LESS yourself! Font Awesome even plays nicely with
< a href = "{{ site.bootstrap.url }}" > Bootstrap 3< / a > !
< / p >
{% endcapture %}
{% include stripe-ad.html %}
< div id = "bootstrapcdn" >
2014-08-20 22:24:25 +08:00
< h2 class = "page-header" > EASIEST: < a href = "http://www.bootstrapcdn.com/#fontawesome_tab" > BootstrapCDN< / a > by < a href = "http://maxcdn.com" > MaxCDN< / a > < / h2 >
< p > Thanks to the generous folks at < a href = "http://maxcdn.com" > MaxCDN< / a > , you can use Bootstrap CDN to add Font Awesome into your website with a single line of code. You don't even have to download or install anything!< / p >
2013-10-20 03:20:03 +08:00
< ol >
< li >
Paste the following code into the < code > < head> < / code > section of your site's HTML.
{% highlight html %}
2014-06-18 00:01:57 +08:00
< link href = "//maxcdn.bootstrapcdn.com/font-awesome/{{ site.fontawesome.version }}/css/font-awesome.min.css" rel = "stylesheet" >
2013-10-20 03:20:03 +08:00
{% endhighlight %}
2013-11-05 20:35:21 +08:00
< p class = "alert alert-success" > < i class = "fa fa-info-circle" > < / i > Immediately after release, it takes a bit of time for BootstrapCDN to catch up and get the newest version live on their CDN.< / p >
2013-10-20 03:20:03 +08:00
< / li >
< li >
Pat yourself on the back for your scalable-vector-icons-on-the-website
< a href = "http://37signals.com/svn/posts/312-lingo-judo" > judo solution< / a > in a single line of code.
< / li >
< li >
Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!
< / li >
< / ol >
< / div >
< section id = "default-css" >
< h2 class = "page-header" > EASY: Default CSS< / h2 >
2014-09-20 09:35:12 +08:00
< p > Use this method to get the default Font Awesome CSS.< / p >
2013-10-20 03:20:03 +08:00
< ol >
< li > Copy the entire < code > font-awesome< / code > directory into your project.< / li >
< li >
In the < code > < head> < / code > of your html, reference the location to your font-awesome.min.css.
{% highlight html %}
< link rel = "stylesheet" href = "path/to/font-awesome/css/font-awesome.min.css" >
{% endhighlight %}
< / li >
< li > Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!< / li >
< / ol >
< / section >
2013-11-05 00:38:17 +08:00
< section id = "ruby-gem-less" >
< h2 class = "page-header" > EASY: < a href = "https://github.com/FortAwesome/font-awesome-less" > LESS Ruby Gem< / a > < / h2 >
2013-10-20 03:20:03 +08:00
< p >
2013-11-05 00:38:17 +08:00
Use the < a href = "https://github.com/FortAwesome/font-awesome-less" > Official Font Awesome LESS Ruby Gem< / a > to easily get Font
Awesome LESS into a Rails project. Generously maintained by < a href = "https://twitter.com/supercodepoet/" > @supercodepoet< / a > .
< / p >
< ol >
< li >
Add this line to your application's Gemfile:
{% highlight bash %}
gem 'font-awesome-less'
{% endhighlight %}
< / li >
< li >
And then execute:
{% highlight bash %}
$ bundle
{% endhighlight %}
< / li >
< li > Or install it yourself as:
{% highlight bash %}
$ gem install font-awesome-less
{% endhighlight %}
< / li >
< / ol >
2014-07-10 16:41:41 +08:00
< p >
If you use Rails, add this to your e.g. < code > application.css< / code > , just before < code > *= require_self< / code > :
< / p >
{% highlight css %}
*= require font-awesome
{% endhighlight %}
2013-11-05 00:38:17 +08:00
< / section >
< section id = "ruby-gem-sass" >
< h2 class = "page-header" > EASY: < a href = "https://github.com/FortAwesome/font-awesome-sass" > SASS Ruby Gem< / a > < / h2 >
< p >
Use the < a href = "https://github.com/FortAwesome/font-awesome-sass" > Official Font Awesome SASS Ruby Gem< / a > to easily get Font
2014-07-10 16:41:41 +08:00
Awesome SASS into a Rails or Compass project. Generously maintained by < a href = "https://twitter.com/supercodepoet/" > @supercodepoet< / a > .
2013-10-20 03:20:03 +08:00
< / p >
< ol >
< li >
Add this line to your application's Gemfile:
{% highlight bash %}
gem 'font-awesome-sass'
{% endhighlight %}
< / li >
< li >
And then execute:
{% highlight bash %}
$ bundle
{% endhighlight %}
< / li >
< li > Or install it yourself as:
{% highlight bash %}
$ gem install font-awesome-sass
{% endhighlight %}
< / li >
< / ol >
2014-07-10 16:41:41 +08:00
< p >
If you use Rails, add this to your e.g. < code > application.css< / code > , just before < code > *= require_self< / code > :
< / p >
{% highlight css %}
*= require font-awesome
{% endhighlight %}
2013-10-20 03:20:03 +08:00
< / section >
< section id = "custom-less" >
2013-11-05 00:38:17 +08:00
< h2 class = "page-header" > PRO: Custom LESS or SASS< / h2 >
< p > Use this method to customize Font Awesome {{ site.fontawesome.version }} using LESS or SASS.< / p >
2013-10-20 03:20:03 +08:00
< ol >
< li > Copy the < code > font-awesome/< / code > directory into your project.< / li >
< li >
2013-11-05 00:38:17 +08:00
Open your project's < code > font-awesome/less/variables.less< / code > or < code > font-awesome/scss/_variables.scss< / code > and edit the < code > @fa-font-path< / code > or < code > $fa-font-path< / code >
2013-10-20 03:20:03 +08:00
variable to point to your font directory.
{% highlight scss %}
@fa-font-path: "../font";
{% endhighlight %}
2013-10-21 07:12:13 +08:00
< p class = "alert alert-success" > < i class = "fa fa-info-circle" > < / i > The font path is relative from your compiled CSS directory.< / p >
2013-10-20 03:20:03 +08:00
< / li >
2013-11-05 00:38:17 +08:00
< li > Re-compile your LESS or SASS if using a static compiler. Otherwise, you should be good to go.< / li >
2013-10-20 03:20:03 +08:00
< li > Check out the < a href = "{{ page.relative_path }}examples/" > examples< / a > to start using Font Awesome!< / li >
< / ol >
< / section >
< section class = "need-ie7" >
< h2 class = "page-header" > Need IE7 Support?< / h2 >
< p >
If you need IE7 support, you have my condolences. Really. Font Awesome {{ site.fontawesome.version }}
doesn't support IE7, but an older version does. You'll need to check out the
< a href = "{{ page.relative_path }}3.2.1/get-started/#need-ie7" > 3.2.1 instructions for using IE7< / a > . Then go complain to
whomever decided your project needs IE7 support.
< / p >
< / section >
2013-10-22 05:24:42 +08:00
< section id = "troubleshooting" >
< h2 class = "page-header" > Troubleshooting< / h2 >
< p >
If you're having trouble with Font Awesome, make sure to check out the
< a href = "{{ site.fontawesome.github.url }}/wiki/Troubleshooting" > troubleshooting wiki page< / a > .
2013-10-23 05:15:50 +08:00
Generously maintained by < a href = "https://twitter.com/gtagliala" > @gtagliala< / a > .
2013-10-22 05:24:42 +08:00
< / p >
< / section >
2013-05-03 08:12:33 +08:00
< / div >