我应该在 Rails 中创建博客还是使用已经存在的博客?

发布于 2024-07-18 21:54:20 字数 108 浏览 4 评论 0原文

在我的下一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

断爱 2024-07-25 21:54:20

你的空闲时间怎么样?

五年,这就是这个小想法花费的时间。 再加上两年的添加花哨的东西。 伙计们,这就是我屈服并使用博客主机的原因。 因为我有很多想法,有很多话要说,要探索,但最多只剩下几十年了。 我无力去追逐每一个浮现在脑海中的五年想法。 在充分考虑了那里的垃圾网络框架和垃圾博客包之后,我决定我不想在接下来的 5 年里实现我对一个像样的自助出版系统的愿景。 别人也能做到。

http://steve-yegge.blogspot.com /2006/03/blog-or-get-off-pot.html

How's your free time?

Five years, that's how long that little idea took. Plus 2 years of adding bells and whistles. And that, folks, is why I'm giving in and using a blog host. Because I have lots of ideas, lots of things to say and to explore, but only a few dozen years left at best. I can't afford to go chasing every 5-year idea that springs to mind. After due consideration of the crap web frameworks and crap blog packages out there, I decided that I don't want to spend my next 5 years implementing my vision for a decent self-publishing system. Someone else can do it.

http://steve-yegge.blogspot.com/2006/03/blog-or-get-off-pot.html

熊抱啵儿 2024-07-25 21:54:20

这是一个经典的构建与购买(或者,在这种情况下,免费下载)的决定,不是吗?

  • 写下您正在寻找的功能集。
  • 调查一下现有的产品,看看是否适合您。
  • 对于最适合的一两个产品,评估是否可以更轻松地编写自己的解决方案或定制产品来满足您的需求。
  • 如果您只需要一个博客网站,那么这是理所当然的。 使用 WordPress 就可以了。
  • 如果此应用程序还有其他功能,而博客只是其中之一,那么请考虑围绕 WordPress 编写一个应用程序。 毕竟它只是一个使用 MySql 的 PHP 应用程序。
  • 如果 WordPress 有您不想要的功能或做的事情,那么也许您确实需要推出自己的功能。
  • 如果该网站最重要的功能是用 RoR 编写,那么您可以自己开发或找到基于 RoR 的博客应用程序,因为 WordPress 不是用 RoR 编写的。 我还没有真正完成这方面的功课,但我认为让 PHP 和 RoR 共享会话状态将是一个耗时的技巧。

It's a classic build-versus-buy (or, in this case, download for free) decision isn't it?

  • Write up the feature set of what you are looking for.
  • Survey the offerings out there to see how close a fit you have.
  • For the one or two products that is the closest fit, evaluate whether or not it would be less effort to write your own solution or customize the offering to do what you need.
  • If all you need is a blog site, then this is a no-brainer. Use WordPress and that's it.
  • If there are other features for this app and blogging is just one of them, then consider writing an app around WordPress. It is just a PHP application using MySql after all.
  • If WordPress has features or does things that you don't want, then maybe you do need to roll your own.
  • If the most important feature for this site is that it is to be written in RoR, then roll your own or find a RoR based blogging app as WordPress is not written in RoR. I haven't really done the homework on this but I would imagine that getting PHP and RoR to share session state would be a time consuming hack.
只有一腔孤勇 2024-07-25 21:54:20

滚动你自己的博客是一个很棒的项目(也很有趣!),但对于实际使用来说,使用预制的东西会更安全,有更酷的功能等等。除非你非常专注,否则你最终可能会走捷径并得到一些不完全是你想要的东西。

尽管我自己是 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.

凡尘雨 2024-07-25 21:54:20

许多 Ruby/Rails 开发人员实际上已经走上了使用静态网站/博客生成器的道路。 这有几个优点。 首先,页面是静态 HTML,不依赖于数据库。 这意味着您的前端 Web 服务器(Apache、Nginx 等)可以比通过 Mongrel、Thin 或 Phusion Passenger 更快地为它们提供服务。 其次,这些页面将更容易被搜索引擎索引。 最后,也许最重要的是,您可以使用 Git(或您最喜欢的 SCM)轻松对帖子进行版本控制。

Mephisto 似乎停滞了。 我正在使用 Tom Preston-Werner 的 JekyllDisqus 查看评论。 效果很好。 试一试!

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!

烦人精 2024-07-25 21:54:20

如果您只是在寻找一个项目,那么构建自己的博客引擎是一个好的开始。

就我个人而言,尽管过去 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.

说不完的你爱 2024-07-25 21:54:20

如果项目是写博客,不要自己写博客。 当您担心产出精彩内容时,有很多解决方案可以为您解决这个问题。

你最终会花很多时间去处理那些并不重要的小事情。

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.

囚我心虐我身 2024-07-25 21:54:20

可能有很多这样的。

例如,RastafariEnkiblog

Probably there are tons of those.

For example, Rastafari, or Enkiblog.

苄①跕圉湢 2024-07-25 21:54:20

在我的下一个 Rails 项目中,我将
需要博客功能。 我是
想知道是否有人有好的
建议,或者我应该发挥我的作用
自己的? (可能 15 分钟内不会)

我不建议滚动您自己的博客系统。 您应该考虑将 Radiant CMS 与博客扩展一起使用。

我认为最重要的功能是优雅地显示代码示例。

为此,我建议您查看 SyntaxHighlighter

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 role my
own? (Probably not in 15 minutes)

I wouldn't recommend rolling your own blog system. You should look into using Radiant CMS with a blog extension.

I think the most important feature will be to display code samples elegantly.

For this I can recommend looking into SyntaxHighlighter.

谷夏 2024-07-25 21:54:20

一切都取决于您的目标:

如果是出于学习目的并且是为了乐趣,请从头开始编码。 另外,尝试添加当前博客平台中找不到的新功能。 例如,采用一种方便开发人员在博客上发布教程或截屏视频的方式。

如果是为客户或只是为了写博客,请使用 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.

白日梦 2024-07-25 21:54:20

我同意,为了乐趣和学习,从头开始编写代码。 但请考虑编写人们真正需要但尚未拥有的东西。 创新。

那里有很多优秀的博客平台,其中一些(例如 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文