静态网站生成器

发布于 2024-12-15 10:50:29 字数 222 浏览 0 评论 0原文

最近,我被要求使用静态网站生成器(例如 Jekyll)创建一个网页。我的问题是:

  • 这与仅使用 HTML 创建网站或在 Visual Studio 中将页面编写为 ASP.net 项目有何不同?
  • 它在服务器上如何工作?
  • 我应该担心哪些问题?

我是一个 .net 人员,所以如果可能的话,我希望能够在 Visual Studio 中创建它。

I was recently asked to create a web page using a static website generator, like Jekyll. My question is this:

  • How does this differ from just creating a website using HTML or writing the page as an ASP.net project in Visual Studio?
  • How does it work on the server?
  • What are some concerns I should have?

I'm a .net guy, so I would like to be able to create this in visual studio, if possible.

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

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

发布评论

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

评论(2

流殇 2024-12-22 10:50:29

以下是我想到的一些优点和缺点:

优点

  • 可以部署在每个服务器上,因为它只是静态 html
  • 有部分,可以重用,与普通 html 相比,你必须编码/复制粘贴
  • 您仍然可以在 IDE 中编码的
  • 所有内容非开发人员可以编辑代码(至少有时)

缺点

  • 模板语言有限,有时有点尴尬/需要习惯
  • 您拥有的新的东西在您的环境中,这会产生额外的成本(多个开发人员需要知道如何构建站点,...)

如果您非常了解当前的工具包并且在您的服务器上托管另一个 ASP.net 项目没有问题,我认为您没有必要在工具链中引入另一个工具。

如果您想做一些事情,让用户可以生成内容 - 就像 github 在 github 页面上所做的那样 - 您可能会考虑这样做。

至于 Jekyll,我们在一个项目上尝试过,作为喜欢编码的开发人员,我们很早就遇到了它的局限性。您可以解决这个问题,但如果您了解编程语言,您会更快。仅仅使用 Jekyll 就能走多远,这仍然很令人着迷

Here are some advantages and disadvantages that came to my mind:

Advantages

  • can be deployed on every server, as it's just static html
  • has partials, that can be reused, in contrast to normal html, where you have to code/copy paste every thing
  • you can still code in an IDE
  • a non developer can edit code (sometimes at least)

Disadvantages

  • the template language is limited and sometimes a bit awkward/needs to get used to
  • you have something new in your environment, which has additional costs (more than one developer needs to know how to build the site, ...)

If you know your current toolkit well and you do not have a problem hosting another ASP.net project on your server, I do not see the need for you to introduce another tool in your tool chain.

If you want to do something, where users can generate content - like github does on the github pages - this is something you might consider.

As for Jekyll, we tried it on one project and being devs, who like to code, we ran into it's limitations quite early. You can work around this, but if you know a programming language you will be faster. It was still fascinating, how far we were able to go with just using Jekyll

等你爱我 2024-12-22 10:50:29

ASP.NET 页面存在于页面的整个生命周期中,并且能够处理请求和会话上下文。请参阅这篇文章 asp.net 页面生命周期
HTML 页面是静态的,您无法访问服务器上的任何变量。

我建议您按照此链接逐步了解如何开发 ASP.NET http:// /www.asp.net/get-started

我希望对

Vicente有帮助

With ASP.NET pages exist throughout the life cycle of the page, and able to work with request and session context. See this article asp.net page life cycle
HTML pages are static and you can not access any variable that is on the server.

I recommend you follow the step by step this link to go to just understand how to develop ASP.NET http://www.asp.net/get-started

I hope that helped

Vicente

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