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:
parent
41df43092d
commit
4fe75da020
10 changed files with 24 additions and 3 deletions
|
@ -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
11
features/fonts.feature
Normal 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"
|
1
fixtures/indexable-app/build/a_folder/needs_index.html
Normal file
1
fixtures/indexable-app/build/a_folder/needs_index.html
Normal file
|
@ -0,0 +1 @@
|
|||
Indexable
|
1
fixtures/indexable-app/build/leave_me_alone.html
Normal file
1
fixtures/indexable-app/build/leave_me_alone.html
Normal file
|
@ -0,0 +1 @@
|
|||
Stay away
|
1
fixtures/indexable-app/build/needs_index/index.html
Normal file
1
fixtures/indexable-app/build/needs_index/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
Indexable
|
1
fixtures/indexable-app/build/regular/index.html
Normal file
1
fixtures/indexable-app/build/regular/index.html
Normal file
|
@ -0,0 +1 @@
|
|||
Regular
|
BIN
fixtures/test-app/source/fonts/StMarie-Thin.otf
Executable file
BIN
fixtures/test-app/source/fonts/StMarie-Thin.otf
Executable file
Binary file not shown.
3
fixtures/test-app/source/stylesheets/fonts.css.sass
Normal file
3
fixtures/test-app/source/stylesheets/fonts.css.sass
Normal file
|
@ -0,0 +1,3 @@
|
|||
@import "compass"
|
||||
|
||||
+font-face("St Marie", font-files("StMarie-Thin.otf", opentype))
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue