Mac OS X Yosemite 10.10.1
- Slim allows you to write very minimal templates which are easy to maintain and pretty much guarantees that you write well-formed HTML and XML
- We also think that the Slim syntax is also aesthetic and makes it much more fun to write templates. Since you can use Slim as a drop-in replacement in all the major framework you can start easily.
- The Slim architecture is very flexible and allows you to write syntax extensions and plugins.
Yes, Slim is speedy! Slim was developed right from the start with performance in mind.
Benchmarks are done for every commit at http://travis-ci.org/slim-template/slim.
Don't trust the numbers? That's as it should be. Please try the benchmark rake task yourself!
However in our opionion you should use Slim because of its features and syntax. We just ensure that Slim doesn't have a negative impact on the performance of your application.
1. Gemfile 設定
添加必要的 gem 套件至
3. code 不斷行，無產生空格問題
因為 slim 預設將 code 的 tag 彼此之間全部不斷行，以致相較以往 html 編寫方式，斷行可產生一個空格，導致版面有所出入，解決方式則是在 tag 後面連著加上 '`'，即可產生一個空格。