开发者

Simple Compass+HAML webserver

开发者 https://www.devze.com 2023-03-12 20:46 出处:网络
I love compass (SASS) and HAML. I\'ve been using staticmatic for building static web pages. Staticmatic seams outdated (no updates, bugs). What are the alternatives?

I love compass (SASS) and HAML. I've been using staticmatic for building static web pages. Staticmatic seams outdated (no updates, bugs). What are the alternatives?

What I would like:

$ preview .
> Server started ad port XXXX
> Now you can use开发者_如何学运维 Compass and HAML

:). So... no configuratio, no directory structure, just haml and sass files.


I am currently using Compass/Sass/Haml with middleman. https://github.com/tdreyno/middleman It is very easy to use, and runs a sinatra in the background so you can see your changes live in your web browser.

After you are done editing and previewing your markup it builds static HTML from your stack of Compass/Sass/Haml. See https://github.com/tdreyno/middleman/wiki for usage.

This requires no conf at all except to tell it which templating engines you are using at setup so I think it is exactly what you are looking for.


You can try jekyll. I think it doesn't work with sass and haml out of the box but you can look at plugins


Don't forget Nanoc. While it is a little involved, it has some slightly more powerful features than StaticMatic. It does depend on a directory however. :/


There are just a ton of static generators around, most of them in Ruby. I'm planning to use Frank for the next few static projects.

  • It uses Tilt to support a ton of template engines
  • It has a concept of layouts, which go in a separate layouts folder, and templates can have a metadata header, but other than that it's very minimal.
0

精彩评论

暂无评论...
验证码 换一张
取 消