4.1 Page Keys

Throughout indie-org, we need a way to "name" pages on the site. For the most part, indie-org requires a page-key to simply be a string that uniquely identifies each page on the site. There are a few instances, however, in which we need a bit more structure:

  1. It must be possible to map an URL naming the page back to a page-key (when retrieving Webmentions)
  2. At page publication time, we need to know the page key corresponding to the page being published is/will be (for recording Webmentions to be sent)

It would be possible to make this parameterizable by, say, providing customizable variables holding functions for performing these two operations. As a first implementation, however, indie-org simply defines "page key" in the obivous way: as the page’s path in a URL naming it on the site (i.e. if the page lives at “https://foo.net/a/b/c.html” on your site, its page-key shall be “a/b/c.html”).