Questions tagged [middleman-4]

Version 4.0 of middleman.

Middleman is a static site generator based on Sinatra (a Rails-like Ruby based tool chain). It incorporates dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). It makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle.


Typical Development Cycle

This is the typical development cycle with Middleman:

  • Run middleman init projectname
  • Start the server with middleman server
  • Modify the files in the directory projectname while viewing them in your browser at http://localhost:4567
  • When you're happy with the files, run middleman build
  • Copy the generated static files from projectname/build to your webserver

Having the server available while developing turns out to be critical, as it allows quick review of changes ( For auto-reload, use middleman-livereload gem). This isn't as much of an issue with "normal" static site generators, but when you start adding partials, SCSS, Compass and the other goodies, that Middleman supports, server mode is invaluable.

Resources

33 questions
0
votes
1 answer

How do I determine the current layout in Middleman 4?

Up through Middleman 3 I could determine the layout of the current page like this. current_page.data.layout As of Middleman 4 this no longer works. How can I determine what the current layout is in 4+?
rb-
  • 2,315
  • 29
  • 41
0
votes
1 answer

Nested lists within YAML outputted iteratively with ERB in Middleman

I want to be able to have an indeterminate amount of lists in my YAML file and if there are any defined to then loop through them iteratively in the template file outputting their contents. I'm currently using the following YAML format; :list …
Cigol
  • 105
  • 1
  • 12
0
votes
1 answer

Rails helper in Middleman `no implicit conversion of Symbol into String`

I'm porting the Gulp Starter Rails helpers to Middleman but am getting the following error: no implicit conversion of Symbol into String related to Ruby /middleman-gulp-starter/helpers/gulp_asset_helper.rb: in join, line 14 I'm not sure of the…
Craig
  • 972
  • 3
  • 13
  • 38
1 2
3