static site
This article is a stub. You can help the IndieWeb wiki by expanding it.
A static site is a website that serves pages directly from files on the web server, which have often been previously generated by static site generator software only when created or updated, instead of for every request.
βAll I know about Paul Graham is he uses static HTML pages instead of Wordpress and that makes him smarter than most of us.β SecuriTay β@SwiftOnSecurity
If youβre looking for software to make a static site, see:
Why
A static site is much simpler to keep up and running than a dynamic website that executes custom code for every page that is requested, or worse, depends on a database which itself may independently go down.
Sending Webmentions
The services below can be used to send Webmentions for a static website.
Telegraph
Telegraph is an open source project and hosted service for sending Webmentions and pingbacks. You can use it to send mentions to all links on a page, or send a webmention with specific source and target.
stapibas
stapibas is an application that sends linkbacks for all links in an atom feed, and receive incoming linkbacks.
lazymention
lazymention is a server that, when pinged, will crawl an h-feed and send Webmentions for any new content it sees. There may be a hosted version eventually, but AJ Jordan has to work out some security things first.
github-to-webmention
github-to-webmention is a self-hostable server that can receives a GitHub webhook notifying it of changes to a static site. It then finds links in new posts and sends webmentions to those targets from the new page.
Receiving Webmentions
The services and software below can be used to receive webmentions for a static website.
webmention.herokuapp.com
webmention.herokuapp.com is an open-source project and hosted service for receiving webmentions for registered sites and allowing those to be displayed through javascript.
webmention.io
webmention.io is an open-source project and hosted service for receiving webmentions and pingbacks on behalf of your indieweb site.
Morris
Morris is a self-hosted PHP service for storing Webmentions from webmention.io in a JSON format that static sites can use to render them without querying webmention.io on each build.
Log HTTP POST data
If you're self-hosting and control the web server you can have it log HTTP POST requests sent to your webmention endpoint URL in a log file. Then you look at the log file with your a text editor and respond manually, or script it, or whatever you like. An example of how to do this with nginx is at "A static, manual system for *receiving* webmentions (and pingback) with nginx" http://superkuh.com/blog/2020-01-10-1.html
go-jamming
go-jamming is a Jamstack/Webmention microservice written by Wouter Groeneveld and the code is available on GitHub. He wrote it originally for use on his Hugo website and describes it at Host your own webmention receiver. Go-jamming makes it possible to service multiple websites with one installation.
Micropub
Static sites that wish to support Micropub will need to run a Micropub endpoint somewhere that has access to the file storage used by the static site or static site generator.
- nanopub - for Hugo
- webpage-micropub-to-github - for Jekyll sites hosted on GitHub Pages
- Sitewriter - for anything that builds from a GitHub repository
- Jamie Tanna's Micropub endpoint commits to the GitLab API and rebuilds his site https://www.jvt.me/posts/2019/08/26/setting-up-micropub/
- Indiekit - has presets for Jekyll and Hugo and supports several options for repository hosting
There was a session at 2020/London on Static Websites and Micropub which may have some additional brainstorming ideas as well.
Brainstorming
Best Practices
There donβt seem to be well-accepted or a documented pattern of best practices for static sites, so it seems reasonable to brainstorm a bit until we have documented real-world examples and exemplars.
Mostly static content
One particular use-case for a static site is a site where literally most of the content is / will be static, infrequently updated, certainly nothing like a stream of posts. Pages may be added, yet rarely updated. Perhaps like a very slowly/minimally edited wiki. Certainly not worth the effort of installing / updating / maintaining an SSG or any other custom software.
What setup would work best for a mostly static content site like that?
URL design
Static sites should still have good URL design, e.g.
- pathnames of words / phrases that are
- easily readable, shareable, memorable, typeable
- well indexed by web search
- lacking extra cruft like filename extensions like .html
See Also
- static site generator (includes a list of projects)
- http://nilclass.com/courses/what-is-a-static-website/
- Static domain hosting
- file-storage
- https://speakerdeck.com/feministy/in-defense-of-static-sites
- https://arstechnica.com/the-multiverse/2017/03/fireside-fiction-company-is-science-fictions-best-kept-secret/
- http://www.oreilly.com/web-platform/free/static-site-generators.csp
- https://www.raymondcamden.com/2017/03/07/working-with-static-sites-final-release
- https://davidea.st/articles/measuring-server-side-rendering-performance-is-tricky
- minimal python static site generator https://l4ur3n.github.io/blog/simple-blogging-engine.html
- http://www.ftwynn.com/articles/creating-a-post-api-for-hugo/
- Why / use-cases, see thread: https://twitter.com/drewm/status/983634762433810432
- "What do you think the best use cases are for a static site generator?" @drewm April 10, 2018
- https://qubyte.codes/blog/automatic-announcement-of-new-blog-entries POSSE to Twitter using Glitch
- Implementing the Indieweb on a static website
- How to POSSE from a static site: https://mxb.at/blog/syndicating-content-to-twitter-with-netlify-functions/
- β years ago websites were made of files; now they are made of dependencies.β https://onezero.medium.com/the-death-of-the-computer-file-doc-43cb028c0506
- Static Gen: A List of Static Site Generators for JAMstack Sites
- https://sebastiandedeyne.com/webmentions-on-a-static-site-with-github-actions/
- 2019-11-08 Max BΓΆck IndieWeb Link Sharing for bookmarks on Eleventy and Netlify
- Waving a thankful goodbye to: static-websites and more.