Générateur de site statique

De Mi caja de notas

(Redirigé depuis Générateurs de sites statiques)


A static site generator or SSG is software that developers can use (typically requiring command line access) to setup a personal site that uses a set of text content files typically stored on a server, and transforms them into a set of static HTML files for a website.

A static site generator can be contrasted with a dynamic website which generates content. Typically, in a dynamic website, there are requests to a server which prepares the HTML to be sent to the user. A static site generator produces the final output HTML pages before-hand thus saving this "dynamic" generation feature from being necessary. This has advantages and disadvantages.

Why

There are many advantages to using a static site generator for your personal site:

  • Long term maintenance advantages
  • Archival ready HTML output
  • Can be hosted on any webserver
  • Easy "Drop" or "Folder upload" deployment solutions available rather than git or automation being as needed
  • Free or cheap static hosting options are available
  • No "moving parts"; nothing to break
  • Easy to get started
  • Source files can be edited on an operating system. Usually its just text files!
  • Generators are typically fairly simple programs to write and modify.
  • Lots of existing options; Few are better than most
  • No database-antipattern
  • Fewer security vulnerabilities with static HTML+CSS

Why not

There are also many disadvantages to using a static site generator for your personal site:

  • Most SSGs are written as CLI programs and are difficult for anyone who is not a developer or does not have the time to learn yet another series of magic text commands
  • Can be difficult to install due to the use of programming language package managers
  • Most SSGs don't scale well with large data sets
  • Supporting dynamic interactivity usually requires JavaScript and APIs
  • Changes can only be shown as quickly as the build runs
  • SSGs are not always a "simple" option: https://kevq.uk/static-site-generators-are-easy-to-useright/

How to

For an introductory guide, see Static Site Generators for Beginners by Brennan Brown.

For details on implementations and examples of IndieWeb building blocks e.g.

  • How to send & receive Webmentions with static site generators

See:

IndieWeb Examples

Popular and Documented SSGs

Graphical Editing User Interfaces

Setting up a CMS or micropub service can help make it easier to post without editing files directly. These usually require some kind of continuous integration to allow automatically building and deploying the site whenever these UIs change the underlying files.

Headless CMSs

Several headless CMSs offer a workflow where you can edit content through a UI and have changes committed directly to the git repository.

Page editing User Interfaces

Some services add the ability to edit pages graphically in a "What You See Is What You Get" style visual editor. This can be more accessible to users without coding experience.

IndieWebCamp Sessions

SSG Category Entries

See Also