All articles
2 min read#features#maintenance#launches

Blocks that appear and disappear on their own

The most common defect on a link page is not a broken link. It is a link that is still true but no longer current.

The window

Every block — a link, a social row, a text heading — can carry two optional moments: one before which it is not shown, and one after which it stops being shown. Outside that window the block is simply absent from the page, as if it had been hidden by hand, and inside it the block behaves like any other.

Nothing is deleted. The label, the note, the image and the short path stay where they were, so a seasonal block comes back next year with one change of dates rather than with a rebuild.

  1. A launch: set the start to the release moment and the waiting-list block to end at the same moment. At midnight one replaces the other with nobody awake.
  2. A sale: set the end. The button removes itself the minute the price goes back up, which is the minute you would have forgotten.
  3. A date, a show, a workshop: set the end to the morning after. An old date at the top of a list is the fastest way to look inactive.
  4. A seasonal service: set both, and let the block return every year on its own.

What the page does at the edges

  • The rule is applied when the page is rendered, so a visitor at 23:59 and a visitor at 00:01 genuinely see different pages.
  • Statistics are unaffected: a block that ran for a week keeps the taps it collected.
  • A short path attached to a block outside its window returns the visitor to the page rather than to an error.
  • The Markdown view of your page shows exactly what a visitor sees, so you can check the state of a window without waiting for it.

Dates are not a plan

A window is a good tool for things whose end you already know: a sale, a date, a campaign. It is a poor tool for things you hope will end — a waiting list that fills, an offer that sells out. Those need a hand on the switch, because the moment is not on a calendar.

And a page made entirely of timed blocks is a page nobody is looking after. Two or three windows are a page that stays current; ten are a page whose owner has stopped reading it.

Read next