How to install and use Slim template engine with Middleman

后端 未结 3 922
傲寒
傲寒 2021-02-10 02:27

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 defau

相关标签:
3条回答
  • 2021-02-10 02:46

    The middleman-slim project by yterajima is helpful in this regard.

    Install is very easy.

    $ gem install middleman
    $ gem install middleman-slim
    $ middleman init PROJECT_NAME --template slim
    
    0 讨论(0)
  • 2021-02-10 02:51

    Bundler tip: you can also include multiple gems at once using Bundler.require. If you have gems in groups, you can include them as such: Bundler.require :group1, :group2 ...

    0 讨论(0)
  • 2021-02-10 03:06

    So here we go... after much reading and searching google for examples I think I figured it out.

    To get Slim working with Middleman

    1. Add gem "slim" to your project's gemfile
    2. go to command line, in your project folder and gem install bundler
    3. In the config.rb file add require 'slim'
    4. Start the middleman server to test it
    0 讨论(0)
提交回复
热议问题