static website generator
Asked Answered
H

2

6

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.

Horning answered 15/11, 2011 at 20:48 Comment(2)
code52 has created a project named pretzel which is a .NET static site generator.Arcograph
For a tool that's way simpler than Jekyll, check out github.com/MarcRochkind/StaticSiteBuilderOla
P
6

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

Pennebaker answered 15/11, 2011 at 21:8 Comment(0)
L
0

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

Lyndes answered 15/11, 2011 at 21:15 Comment(2)
I don't know about other servers, but with apache, it is possible to use variables in HTML files. This is done through server side includes. See: "httpd.apache.org/docs/current/mod/mod_include.html". I realize this question is pointing toward a Microsoft stack, but I think it's worth mentioning that there are cases where HTML can use variables. Even if it's on a different server.Supernaturalism
@Vicente Jr you misinterpreted what the question is about. Static site generators are usually used for content which changes rarely. For instance, let's say I have a small business and I want a website with basic information (but NOT selling anything on the website). Let's say I have an Employees page. Well, Employees will probably change over the lifetime of the website, so it should be dynamic (relying on a DB). Yet, it's not changing every second/minute/hour/day. New employee -> regenerate the website.Arcograph

© 2022 - 2024 — McMap. All rights reserved.