Générateur de site statique
De Mi caja de notas
Révision datée du 22 juin 2019 à 09:56 par Xtof (discussion | contributions) (Page créée avec « {{:iwc:static_site_generator}} »)
This article is a stub. You can help the IndieWeb wiki by expanding it.
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
- rascul is writing his own site generator for https://rascul.io.
- bear is writing and using Hakkan.
- Emma Kuo is writing and using Skein.
- Daniel Goldsmith is using Hugo and writing nanopub, a micropub-endpoint for SSGs
- AJ Jordan is writing Stratic and lazymention (Webmention for static sites)
- Amit Gawande is using Hugo and posting with micro.blog via a micropub-endpoint
- capjamesg uses Aurora to generate his website.
- Ethan Yoo is using Hugo for ethanyoo.com and mdBook for his personal wiki
- ttntm is using Eleventy to build his site since switching from Hugo in 04/2021
- adi is writing and using mkws, a simple static site generator using sh as templating language.
- Anthony Ciccarello is using Eleventy to build his site after switching from Jekyll for ciccarello.me
- Pablo Morales is using Datenstrom Yellow a flat-file CMS (static site generator) for his website.
- jo uses a personalized version of the bashblog script for their blog
- Add yourself here… (see this for more details)
Popular and Documented SSGs
- Hugo (Go)
- Jekyll (Ruby)
- Jekyll has support for an "incremental build" mode which only builds files that have been changed. This reduces the deploy time after a cache has been built of posts.
- Pelican (Python)
- Hakyll
- Harp
- Wintersmith
- Middleman
- Eleventy (AKA "11ty", built on node.js)
- Nikola
- PieCrust
- Zola (Rust)
- Crotal
- Docpad (now considered "archived")
- Datenstrom
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
- 2014/static-sites
- 2015/static
- 2015/Static Websites
- 2015/Edinburgh/static
- 2015/Brighton/static
- 2016/Nuremberg/static
- 2016/StaticPOSSE
- 2017/Nuremberg/static
- 2019/Düsseldorf/ssgcms
See Also
- static site
- static site cms
- Static hosting
- services
- CMS
- projects
- https://github.com/strugee/lazymention app that can handle webmention sending and websub hub pings when notified of new deploy
- webmention.io receiver for static sites - https://github.com/martymcguire/morris - bake webmention data during build
- https://twitter.com/qubyte/status/1031553113583493122
- "And if you're a web dev like me, it's extremely satisfying to roll a little static site generator and play with things like microformats and webmentions." @qubyte August 20, 2018
- Introduction to SSG from 2015
- List of SSG
- https://twitter.com/zachleat/status/1257414895110369280
- "listen—fine—SSR your static build on demand at request-time but before I’ll get on board we need to agree that you’ve reinvented PHP" @zachleat May 4, 2020
- how to make your own https://blog.lmorchard.com/2020/05/25/diy-easy-blog-oven/
- https://css-tricks.com/comparing-static-site-generator-build-times/
- Waving a thankful goodbye to: static-websites and more.
- https://en.wikipedia.org/wiki/Static_site_generator#Examples see here for more, no need to make this page a comprehensive list of all SSGs. One minimum criteria for addition could/should be: is anyone here in the community actually using a particular SSG to host their personal site? And if so, get that example before documenting it on this page
- Criticism: high admintax “…just to avoid having to type a few brackets.” https://mastodon.social/@rmloveland/112711358776850636
- "I wrote a little more about this problems of debugging static site generators vs just writing HTML“Do you enjoy debugging programming language installations? What about the language’s package ecosystem? What about the language’s deployment model (or lack thereof)? Congratulations, you now get to be a sysadmin who has to care about all of these things. This is a mile high mountain of dependencies to be dealing with all just to avoid having to type a few brackets.”https://logicgrimoire.wordpress.com/2024/07/01/writing-html-by-hand-is-easier-than-debugging-your-static-site-generator/" @rmloveland July 1, 2024
- 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/