带有Haml/Sass的Wordpress [英] Wordpress with Haml/Sass

查看:66
本文介绍了带有Haml/Sass的Wordpress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已使用 Haml Sass 对于一些Rails辅助项目,我发现它们极大地加快了我的前端开发速度.但是,我还没有找到像Wordpress那样强大或熟悉的Rails博客平台,因此,对于那些需要具有基本CMS/博客功能的轻型网站的项目,这仍然是我的首选. (我研究了Radiant,Mephisto等,虽然我当然很喜欢Rails博客引擎的建议,但这并不是我想在这里回答的问题.)

Having used Haml and Sass for a few Rails side projects, I've found that they speed up my frontend development tremendously. However, I haven't found a Rails blogging platform that's as robust or familiar to clients as Wordpress, so that's still generally my go-to for projects that require a light website with basic CMS / blogging functionality. (I've looked into Radiant, Mephisto, etc, and while I certainly appreciate suggestions of Rails blog engines, that's not really the question I'm looking to answer here.)

我真的很希望能够在Wordpress网站的上下文中使用Haml和Sass,并且我知道

I'd really like to be able to use Haml and Sass in the context of a Wordpress site, and while I'm aware of the existence of various PHP implementations, most seem inactive or buggy. Has anyone here had success using Haml and Sass with Wordpress sites? I'm asking this both in the context of Wordpress template files (the .php files that power a Wordpress theme) and in the HTML editing mode of the Wordpress editor, though the latter is far less important.

注意:我知道我可以安装适当的红宝石宝石,并从Haml/Sass源代码编译我自己的HTML/CSS;我正在寻找的是与我在Rails中惯用的功能类似的东西,其中已编译的HTML/CSS是根据每个请求自动生成的(缓存行为也不错,但当然不是必需的).

Note: I'm aware that I can just install the appropriate ruby gems and compile my own HTML/CSS from the Haml/Sass source; what I'm looking for is something more along the lines of the functionality I'm used to in Rails, where the compiled HTML/CSS is autogenerated on a per-request basis (caching behaviour would also be nice, but is certainly not required).

提前谢谢!

推荐答案

对于定制需求低的网站,我处于同一个状态.我已经习惯了Haml和Sass,以至于回到HTML和CSS似乎很痛苦. PHamlP已获得一些好评,尤其是因为它支持Sass:(http://code.google.com/p/phamlp/).不过,没有什么可以替代真实的东西.

I'm in the same boat with respect to the sites with a low demand for customization. I'm so used to Haml and Sass that going back to HTML and CSS seems painful. PHamlP has gotten some good reviews, especially because it supports Sass: (http://code.google.com/p/phamlp/). Still, there's no substitute for the real thing.

如果这是我的项目,我会考虑使用Compass并在进行更改时进行指南针更新. Sass太好了,无法通过. Haml是您日常的面包和黄油,但Sass确实可以帮助您使页面唱歌.它建议您可能从未想到过的样式表重构.

If it were my project, I'd consider Compass and just do a compass update when I made changes. Sass is too good to pass up. Haml is your daily bread and butter, but Sass can really help you make pages sing. It suggests stylesheet refactorings you might never have thought of otherwise.

这篇关于带有Haml/Sass的Wordpress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆