Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would pack the web fonts in an archive and put that archive somewhere separate from the repository. (Amazon S3 is a prime candidate.) Then, I'd have the release process retrieve and unpack this archive at deploy time.</p> <p>This lets you put your entire app in your public repository -- the Capistrano scripts, the Rake tasks, etc. -- but leaves the actual font binaries out, with their location specified as a matter of configuration. This is consistent with <a href="http://www.12factor.net/" rel="nofollow">12-factor app principles</a>, treating these webfonts as an external resource needed by but not contained within your application.</p> <p>You could, for example, specify a <code>WEBFONTS_URL</code> environment variable, and add a <code>fetch_webfonts</code> Rake task. This task would automatically pull these resources into your application, and would do nothing in the case that <code>WEBFONTS_URL</code> is unspecified -- e.g. if someone else did a checkout of your repo without having these fonts. (You could even make the task do appropriate things with stylesheets, ensuring that the fresh-checkout users get a working app without 404ing on font files.) Rake allows you to add dependencies to existing tasks, so you can ensure this happens automatically as part of <code>assets:precompile</code>, which Capistrano very likely already invokes.</p> <p>Additionally, this approach works equally well on development and production: you can take a fresh checkout of your own repo, specify the appropriate <code>WEBFONTS_URL</code>, and end up with a working set of fonts on your local machine. (The <a href="http://opensoul.org/blog/archives/2012/07/24/dotenv/" rel="nofollow">dotenv</a> gem makes it easy to get development configuration into environment variables, keeping all your environments consistent.) Just be sure that you <code>.gitignore</code> the results so you don't accidentally make them public after all.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload