static site generator: Difference between revisions

From IndieWeb
m ([tantek] added "Alternative: write HTML by hand: 2024-07-01 [https://logicgrimoire.wordpress.com/2024/07/01/writing-html-by-hand-is-easier-than-debugging-your-static-site-generator/" to "See Also")
(move IndieWeb Examples higher up, move advantages and disadvantages to WHy and Why not sections before that.)
 
Line 3: Line 3:
A '''<dfn>static site generator</dfn>''' or '''<dfn>SSG</dfn>''' 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 '''<dfn>static site generator</dfn>''' or '''<dfn>SSG</dfn>''' 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.


== How to ==
== ==
For details on implementations and examples of [[building blocks|IndieWeb building blocks]] e.g.
to static site :
* How to send & receive Webmentions with static site generators
 
See:
* [[static site]]


== Advantages ==
* Long term maintenance advantages
* Long term maintenance advantages
* Archival ready HTML output
* Archival ready HTML output
Line 23: Line 18:
* Fewer security vulnerabilities with static HTML+CSS
* Fewer security vulnerabilities with static HTML+CSS


== Disadvantages ==
===
=
 
* 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
* 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
* Can be difficult to install due to the use of programming language package managers
Line 30: Line 27:
* Changes can only be shown as quickly as the build runs
* 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/
* SSGs are not always a "simple" option: https://kevq.uk/static-site-generators-are-easy-to-useright/


== Popular and Documented SSGs ==
== Popular and Documented SSGs ==
Line 57: Line 78:
* [https://www.builder.io/ Builder]
* [https://www.builder.io/ Builder]


== IndieWeb Examples ==
* {{rascul}} is writing his own site generator for https://rascul.io.
* {{bear}} is writing and using [[Hakkan]].
* {{emmak}} is writing and using [[Skein]].
* {{dgold}} is using [[Hugo]] and writing [[nanopub]], a [[micropub-endpoint]] for SSGs
* {{strugee}} is writing [[Stratic]] and [[lazymention]] (Webmention for static sites)
* {{amitgawande}} is using [[Hugo]] and posting with [[micro.blog]] via a [[micropub-endpoint]]
* {{capjamesg}} uses [[Aurora]] to generate his website.
* {{ethanyoo}} is using [[Hugo]] for [https://www.ethanyoo.com ethanyoo.com] and mdBook for his personal wiki
* {{ttntm}} is using [[Eleventy]] to build his site since [https://ttm.sh/2uu switching from Hugo] in 04/2021
* {{adi}} is writing and using [https://mkws.sh mkws], a simple static site generator using sh as templating language.
* {{aciccarello}} is using [[Eleventy]] to build his site after switching from [[Jekyll]] for [https://www.ciccarello.me/colophon/#technology ciccarello.me]
* {{lifeofpablo}} is using [https://datenstrom.se/ Datenstrom Yellow] a flat-file CMS (static site generator) for his website.
* {{jo}} uses a personalized version of the [https://github.com/cfenollosa/bashblog bashblog] script for their blog
* {{addyourself}}


== IndieWebCamp Sessions ==
== IndieWebCamp Sessions ==

Latest revision as of 21:55, 5 July 2024


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.

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
  • 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 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.


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

See Also