对于主要包含静态页面和少量表单的网站来说,Rails 是否是一个足够轻量级的解决方案?

发布于 2024-12-17 11:37:09 字数 366 浏览 3 评论 0原文

我正在寻找比使用 Ruby on Rails 更简单的方法来编写小型个人网站的建议(我想说我有“中级”经验)。该网站将主要是由块(文章、菜单等)构建的静态页面,我希望能够使用 Markdown 之类的东西进行创作,以便非技术人员也可以编写文章。该网站还需要一些简单的反馈类型的表格。我可能不需要大量的测试。

该网站的外观将非常简单,我希望完全控制外观和感觉。我熟悉 Rails、Ruby、Javascript、HTML 和 CSS。

我想知道的是,我是否会使网站的维护(包括部署)和内容创作变得比使用 Rails 所需的更加复杂。我听说过一些有关 Sinatra 的信息,这引起了我的兴趣,但从未使用过它 - 这会减少维护开销吗?

如果网站要求用户登录,建议是否会改变?

I'm looking for recommendations on a simpler way to author a small personal website than using Ruby on Rails (with which I would say I have 'intermediate' experience). The site will be mainly static pages built up from chunks (articles, menus, etc) that I would like to be able to author with something like Markdown so that non-techies can write articles. The site will also need some simple feedback-type forms. I probably don't need extensive tests.

The site will be pretty minimal in look and I want complete control over the look and feel. I'm comfortable with Rails, Ruby, Javascript, HTML and CSS.

What I'm wondering is whether I'll be making maintenance (including deployment) and authoring of content for the site more complicated than it needs to be by using Rails. I've heard a bit about Sinatra that piqued my interest but never used it - would that be less maintenance overhead?

Does the recommendation change if the site requires the user to login?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

口干舌燥 2024-12-24 11:37:09

看一下这里列出的一些静态网站生成器:

http://nanoc.stoneship.org /docs/1-introduction/

或此处:

https://www.ruby-toolbox.com/categories/static_website_ Generation

例如,Jekyll< /a> 因构建使用 Markdown 编写的静态网站而越来越受欢迎。 OctoPress 甚至可能正是您所需要的;它基于 Jekyll 来生成静态网站,但它附带了 HTML 模板、CSS、Javascript 以及已经设置为博客或 CMS 的所有内容。

您提到需要反馈表格。您可以将静态网站与简单的 Rails 或 Sinatra 应用程序结合起来;或者,添加由许多专门从事该领域的服务托管的 Web 表单可能会更容易。

Take a look at some of the static website generators listed here:

http://nanoc.stoneship.org/docs/1-introduction/

or here:

https://www.ruby-toolbox.com/categories/static_website_generation

For example, Jekyll is gaining in popularity for building static websites that are authored with Markdown. OctoPress might even be what you need; it is based on Jekyll for static website generation but it comes with HTML templates, CSS, Javascripts and everything already set up as a blog or CMS.

You mention a need for forms for feedback. You could combine a static website with a simple Rails or Sinatra app; alternatively, it may be easier to add web forms hosted by many of the services that specialize in that.

多孤肩上扛 2024-12-24 11:37:09

我用 Rails 做了一个网站,现在又用 Sinatra 做了一个。我可以说,作为一名交流程序员,rails 的所有“魔力”让我感到困惑。西纳特拉似乎更适合我。通过登录等设置数据库很容易...

我发现 Sinatra 的工作原理与广告中所宣传的一样,开发人员实际上正在开发它,等等。我将部署在 heroku 上 - 与 Sinatra 配合得很好。

但你似乎在描述一个 WordPress 网站 - 它可以控制多个用户、文章、发帖等。我已经构建了 Wordpress,并对这一切如此简单感到满意。 godaddy Wordpress 选项非常好。使用您自己托管的 Wordpress,您可以做很多事情。当然,您可能有需要一些 gem 等的想法。

我认为 ruby​​ 更适合不以内容为导向,但做一些原创的网站。也许你想做一个学习 Sinatra 的项目?

I did a site in rails, and now one with Sinatra. I can say as a c programmer at heart that rails confuses me with all the 'magic'. Sinatra just seems a better fit for me. It's easy to set up a db with login, etc...

I have found that Sinatra works as advertised, with developers actually working on it, etc. I would deploy on heroku - works great with Sinatra.

But you seem to be describing a Wordpress site - which has control for multiple users, articles, posting, etc. I have built Wordpress and am happy with how easy it all is. The godaddy Wordpress option is really nice. With your own hosted Wordpress you can do a lot. Of course you may have ideas that require some gem, etc.

I think that ruby is better for sites that are not content oriented, but do something original. Maybe you want to do the project to learn Sinatra?

一向肩并 2024-12-24 11:37:09

我非常喜欢 Sinatra(带有标记模板)。这样我就可以轻松地从部分内容构建“静态”页面,并也将奇怪的形式放入其中。感谢您的回复 - 有两个人建议了 Sinatra,但我不想接受其中一个!

I've plumped for Sinatra (with Markup templates). This way I can easily build 'static' pages from partials and lob the odd form in too. Thanks for the replies - two people suggested Sinatra and I didn't want to accept one over the other!

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