1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

font directory fixes

This commit is contained in:
Thomas Reynolds 2011-09-17 12:52:40 -07:00
parent 41df43092d
commit 4fe75da020
10 changed files with 24 additions and 3 deletions

View file

@ -4,6 +4,7 @@
- Allow data/ files to be in JSON format as well
- Enabled Liquid {% include %} tag
- RubyInstaller-specific gem
- Allow access to data/ in config.rb
2.0.8
=====

11
features/fonts.feature Normal file
View file

@ -0,0 +1,11 @@
Feature: Web Fonts
Scenario: Checking built folder for content
Given a built app at "test-app"
Then "stylesheets/fonts.css" should exist at "test-app" and include "/fonts/StMarie-Thin.otf"
And cleanup built app at "test-app"
Scenario: Rendering scss
Given the Server is running at "test-app"
When I go to "/stylesheets/fonts.css"
Then I should see "/fonts/StMarie-Thin.otf"

View file

@ -0,0 +1 @@
Indexable

View file

@ -0,0 +1 @@
Stay away

View file

@ -0,0 +1 @@
Indexable

View file

@ -0,0 +1 @@
Regular

Binary file not shown.

View file

@ -0,0 +1,3 @@
@import "compass"
+font-face("St Marie", font-files("StMarie-Thin.otf", opentype))

View file

@ -25,7 +25,6 @@ module Middleman::Base
app.set :js_dir, "javascripts" # Where to look for javascript files
app.set :css_dir, "stylesheets" # Where to look for CSS files
app.set :images_dir, "images" # Where to look for images
app.set :fonts_dir, "fonts" # Where to look for fonts
app.set :build_dir, "build" # Which folder are builds output to
app.set :http_prefix, nil # During build, add a prefix for absolute paths

View file

@ -1,6 +1,9 @@
module Middleman::CoreExtensions::Compass
class << self
def registered(app)
# Where to look for fonts
app.set :fonts_dir, "fonts"
app.extend ClassMethods
require "compass"
@ -56,8 +59,8 @@ module Middleman::CoreExtensions::Compass
File.join(app.http_prefix || "/", app.js_dir)
end
config.http_javascripts_path = if app.respond_to? :http_fonts_path
app.http_js_path
config.http_fonts_path = if app.respond_to? :http_fonts_path
app.http_fonts_path
else
File.join(app.http_prefix || "/", app.fonts_dir)
end