我应该在 Rails 中创建博客还是使用已经存在的博客?
在我的下一个 Rails 项目中,我将需要博客功能。 我想知道是否有人有任何好的建议,或者我应该自己推出? (可能不会在 15 分钟内)
我认为最重要的功能是优雅地显示代码示例。
In my next rails project I'm going to need blogging functionality. I'm wondering whether anyone has any good suggestions, or should I just roll my own? (Probably not in 15 minutes)
I think the most important feature will be to display code samples elegantly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(10)
你的空闲时间怎么样?
http://steve-yegge.blogspot.com /2006/03/blog-or-get-off-pot.html
How's your free time?
http://steve-yegge.blogspot.com/2006/03/blog-or-get-off-pot.html
这是一个经典的构建与购买(或者,在这种情况下,免费下载)的决定,不是吗?
It's a classic build-versus-buy (or, in this case, download for free) decision isn't it?
滚动你自己的博客是一个很棒的项目(也很有趣!),但对于实际使用来说,使用预制的东西会更安全,有更酷的功能等等。除非你非常专注,否则你最终可能会走捷径并得到一些不完全是你想要的东西。
尽管我自己是 Rails 爱好者,但我还是 Wordpress 的忠实粉丝。 如果您正在寻找基于 Rails 的博客引擎,我很幸运地使用了 Mephisto,尽管文档留下了一些东西被期望。 Radiant CMS 是另一个可能值得关注的 CMS/博客系统。
Rolling your own blog is a great project (and quite fun too!), but for practical usage, using something pre-made is going to be more secure, have more cool features, etc. etc. Unless you're incredibly dedicated, you'll probably end up cutting corners and end up with something that isn't quite what you want.
Despite being a Rails guy myself, I'm a huge fan of Wordpress. If you're looking for Rails-based blog engines, I've had luck with Mephisto, although the documentation leaves something to be desired. Radiant CMS is another CMS/Blog system that might be worth looking at.
许多 Ruby/Rails 开发人员实际上已经走上了使用静态网站/博客生成器的道路。 这有几个优点。 首先,页面是静态 HTML,不依赖于数据库。 这意味着您的前端 Web 服务器(Apache、Nginx 等)可以比通过 Mongrel、Thin 或 Phusion Passenger 更快地为它们提供服务。 其次,这些页面将更容易被搜索引擎索引。 最后,也许最重要的是,您可以使用 Git(或您最喜欢的 SCM)轻松对帖子进行版本控制。
在 Mephisto 似乎停滞了。 我正在使用 Tom Preston-Werner 的 Jekyll 和 Disqus 查看评论。 效果很好。 试一试!
A lot of Ruby/Rails developers have actually gone the route of using static website/blog generators. This has a few advantages. First, the pages are static HTML with no dependency on a database. This means they can be served by your front-end Web server (Apache, Nginx, etc.) faster than if they were to go through Mongrel, Thin or Phusion Passenger. Secondly, the pages will be easier for search engines to index. Finally, and probably most importantly, you can easily version control your posts using Git (or your favorite SCM)
I switched my blog over to a static model after development on Mephisto seemed to stall. I am using Tom Preston-Werner's Jekyll and Disqus for the comments. Works great. Give it a try!
如果您只是在寻找一个项目,那么构建自己的博客引擎是一个好的开始。
就我个人而言,尽管过去 3 年我一直是一名全职 Rails 开发人员,但我仍然为自己和其他人使用并推荐 Wordpress。
If you are just looking for a project, then building your own blog engine is a good start.
Personally, though I have been a full-time Rails developer for the past 3 years, I still use and recommend Wordpress for myself and others.
如果项目是写博客,不要自己写博客。 当您担心产出精彩内容时,有很多解决方案可以为您解决这个问题。
你最终会花很多时间去处理那些并不重要的小事情。
If the project is to write a blog, don't roll your own. There are plenty solutions out there that will solve this problem for you while you worry about pumping out great content.
You will end up spending to much time futzing with the little things that don't really matter.
可能有很多这样的。
例如,Rastafari 或 Enkiblog。
Probably there are tons of those.
For example, Rastafari, or Enkiblog.
我不建议滚动您自己的博客系统。 您应该考虑将 Radiant CMS 与博客扩展一起使用。
为此,我建议您查看 SyntaxHighlighter。
I wouldn't recommend rolling your own blog system. You should look into using Radiant CMS with a blog extension.
For this I can recommend looking into SyntaxHighlighter.
一切都取决于您的目标:
如果是出于学习目的并且是为了乐趣,请从头开始编码。 另外,尝试添加当前博客平台中找不到的新功能。 例如,采用一种方便开发人员在博客上发布教程或截屏视频的方式。
如果是为客户或只是为了写博客,请使用 wordpress。 您可以在 ruby 中创建您的网站,然后链接到 wordpress。 想想看,wordpress 背后需要多少人力时间才能匹配,你需要全职工作 8 年。
Wordpress 开箱即用,然后您可以根据未来的需求定期对其进行调整。
All depends on your goal:
If it is for learning purposes and it's for fun, code it from scratch. Also, try to add new functionality that you will not find in current blogging platforms. For example, make in a way that is easy for a developer to blog tutorials or screencasts.
If it's for a client or just to blog, use wordpress. You can have your site in ruby and then link to wordpress. Think about it, how many human hours are behind wordpress so for you to match that you will need to work full time on it for 8 years.
Wordpress will work out of the box and then periodically you can tweak it, depending on future needs.
我同意,为了乐趣和学习,从头开始编写代码。 但请考虑编写人们真正需要但尚未拥有的东西。 创新。
那里有很多优秀的博客平台,其中一些(例如 Wordpress)拥有活跃的开发人员社区,编写了数百个有用且强大的插件。 其中包括对代码示例的一些出色支持。
无需重新发明轮子。
I agree, for fun and learning, code from scratch. But consider coding something people really need and don't already have. Innovate.
There are so many excellent blog platforms out there, and some (like Wordpress) have active developer communities writing hundreds of useful and powerful plugins. And that includes some excellent support for code samples.
No need to reinvent the wheel.