static site

From IndieWeb
(Redirected from static)


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.

webmention.app

https://webmention.app/

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

Main article: webmention.io

webmention.io is an open-source project and hosted service for receiving webmentions and pingbacks on behalf of your indieweb site.

Morris

Main article: 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.

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