0

I'm new to both Ruby on Rails and Locomotive CMS, but I'm just starting to create my first site with them.

I've got the engine running in a full Rails app (I'm going to need to deploy it on our own server later on). But it's just spitting out the 'Template' content defined through the admin interface, without any other template/content around it.

admin screen

enter image description here

I can 'fix' it by shoving the html for the whole page in through this input field. But that's not right, surely? The Getting Started guide talks of putting the templates in the filesystem, at something like: Pages/index/first page. "All pages are inherited from index". I have an index.liquid under views/pages but it's not picking that up... (I've tried a couple of other locations too).

I'm sure this is a dumb question, but please could someone tell me where to put my template in the file system? Or how to point Locomotive to pick it up from the right place?

(I did get the file system liquid template working by defining it through the Rails way, with a route, a controller and adding a liquid template initializer I found here. But then it's missing the variables that should come from the CMS content).

I'm loading the site using bundle exec unicorn_rails. And I'm using Rails v3.2.13, Ruby v1.9.3 and Locomotive_cms v2.2.2.

Thanks!

4

1 回答 1

8

我是 LocomotiveCMS 的 Didier。

LocomotiveCMS 与其他 CMS 有点不同,从某种意义上说,我们提供了一个名为 Wagon 的工具来本地管理您的站点,而无需安装 mongodb、rails 和其他一些组件。另一个巨大的好处是您可以用 HAML 编写模板,用 SASS/SCSS 或 Less(我们也嵌入了 Compass)和我们首选的文本编辑器(在浏览器中编辑整个站点是一场噩梦)编写您的 CSS。这是一个很好的生态系统,以便在开发 LocomotiveCMS 网站时非常高效。

完成本地工作后,您可以将站点部署到远程 LocomotiveCMS 引擎,方法与将应用程序推送到 Heroku 类似。实际上,推送站点将为最终用户创建后台。

我建议您阅读该页面。 http://doc.locomotivecms.com/guides/get-started/requirements 这个也是 http://www.locomotivecms.com/tour

我们的官方网站上的信息还不清楚,但相信我,我们正在努力让它变得更好。

希望它会帮助你!

迪迪埃

于 2013-08-01T14:18:16.640 回答