middleman

Accessing multi-layered YAML and Middleman

我怕爱的太早我们不能终老 提交于 2019-12-08 03:20:55
问题 After taking a look at these two links, using YAML with Middleman has become a lot more clear: Middleman Docs(Local Data), parsing and composing YAML The issue that I'm running into now is accessing multiple levels of content. YAML (lives in data/projects) - quote: This is a quote attribution: Kate Something extras: - extra one - extra two - extra three - quote: Blah blah attribution: Donna Doe extras: - another extra - another extra .HTML.ERB <% data.projects.each do |f| %> <div><%= f["quote

Why does `middleman serve` work, but `middleman build` fails to compile this Sass?

丶灬走出姿态 提交于 2019-12-07 05:48:11
问题 When I just run middleman to serve, all.css gets compiled fine, consisting of just a call to +box-shadow(none) : /* line 1, /home/yang/asdf/source/stylesheets/content.css.sass */ div { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } But when I build the site, I get this Sass/Compass error: $ middleman build Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0 Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0 Slim:

Accessing multi-layered YAML and Middleman

て烟熏妆下的殇ゞ 提交于 2019-12-06 16:53:41
After taking a look at these two links, using YAML with Middleman has become a lot more clear: Middleman Docs(Local Data) , parsing and composing YAML The issue that I'm running into now is accessing multiple levels of content. YAML (lives in data/projects) - quote: This is a quote attribution: Kate Something extras: - extra one - extra two - extra three - quote: Blah blah attribution: Donna Doe extras: - another extra - another extra .HTML.ERB <% data.projects.each do |f| %> <div><%= f["quote"] %> <%= f["attribution"] %> <%= f["extras"] %></div> <% end %> The above is running smoothly with

Why won't Middleman include the rb-inotify and therubyracer gems once installed?

荒凉一梦 提交于 2019-12-06 08:52:29
问题 I have: $ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] $ middleman version Middleman 2.0.13.1 $ cat /etc/debian_version 6.0.3 if I start a project like so: $ middleman init np --rack --bundler --template=html5 create np/config.ru create np/Gemfile run bundle install Fetching source index for http://rubygems.org/ Using multi_json (1.0.3) Using activesupport (3.1.1) Using addressable (2.2.6) Using chunky_png (1.2.5) Using coffee-script-source (1.1.2) Using execjs (1.2.9)

Why does `middleman serve` work, but `middleman build` fails to compile this Sass?

纵饮孤独 提交于 2019-12-05 11:03:59
When I just run middleman to serve, all.css gets compiled fine, consisting of just a call to +box-shadow(none) : /* line 1, /home/yang/asdf/source/stylesheets/content.css.sass */ div { -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; } But when I build the site, I get this Sass/Compass error: $ middleman build Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0 Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0 Slim::EmbeddedEngine is deprecated, it is called Slim::Embedded in Slim 2.0 /home/yang/asdf/source/stylesheets/content

How to get YAML files to render in middleman with erb

泄露秘密 提交于 2019-12-04 18:25:17
I have a file written in yaml that I would like to render with middleman using erb. How do I render this so that the yaml file will be translated to HTML. I would later like to style it using CSS. I have found no information of how to do this basic task online anywhere. For example say I have the yaml file: main_title: 'Ruby Operators' sections: - section_title: 'Arithmetic' items: - title: '[ + ] Addition: ' value: 'Adds values on either side of the operator' - title: '[ − ] Subtraction: ' value: 'Subtracts right hand operand from left hand operand' - title: '[ * ] Multiplication: ' value:

Why won't Middleman include the rb-inotify and therubyracer gems once installed?

时光怂恿深爱的人放手 提交于 2019-12-04 15:27:33
I have: $ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] $ middleman version Middleman 2.0.13.1 $ cat /etc/debian_version 6.0.3 if I start a project like so: $ middleman init np --rack --bundler --template=html5 create np/config.ru create np/Gemfile run bundle install Fetching source index for http://rubygems.org/ Using multi_json (1.0.3) Using activesupport (3.1.1) Using addressable (2.2.6) Using chunky_png (1.2.5) Using coffee-script-source (1.1.2) Using execjs (1.2.9) Using coffee-script (2.2.0) Using fssm (0.2.7) Using sass (3.1.10) Using compass (0.11.5) Using daemons (1

How to install and use Slim template engine with Middleman

好久不见. 提交于 2019-12-04 12:47:02
问题 I'm new to Middleman and ruby in general. I've installed Ruby I've installed Middleman and the gems to get it running. I need to use slim instead of the default template system. So I installed the Slim gem. Slim's website only says that I need to require 'slim' in order to get it to work. The middleman website says I only need add the template engine to the config.rb file, but it gives no examples... For someone with no ruby background, this is no help. I looked for several config.rb on git

Middleman using Foundation 6

好久不见. 提交于 2019-12-02 12:24:38
问题 I want to use Middleman with wonderful Foundation 6. Here is a repo I've found on Middleman's website. I have Middleman installed as well as Xcode developers tools. When I run middleman init -T james-weaver/middleman-foundation-6 portfolio in my Terminal I get Unknown Project Template error. What am I doing wrong here? 回答1: Try to install foundation-sites (v6) at the root of your Middleman project, using NPM: cd middleman-project npm init -y npm install foundation-sites --save Then, at the

Middleman using Foundation 6

爱⌒轻易说出口 提交于 2019-12-02 07:28:52
I want to use Middleman with wonderful Foundation 6. Here is a repo I've found on Middleman's website. I have Middleman installed as well as Xcode developers tools. When I run middleman init -T james-weaver/middleman-foundation-6 portfolio in my Terminal I get Unknown Project Template error. What am I doing wrong here? Try to install foundation-sites (v6) at the root of your Middleman project, using NPM: cd middleman-project npm init -y npm install foundation-sites --save Then, at the file source/stylesheets/site.css.scss , add: @import '../../node_modules/foundation-sites/scss/foundation';