More slugs for microblogging

To revive some of the earlier sticking points around microblogging in Hugo, I’d like to add a few more slug types to allow permalinking to an update while still not focusing on its exact creation time / contents too much.

My proposals:

  • /:unix to just use the current Unix timestamp (seconds from epoch, i.e. 1970-1-1), e.g. /1758898299
    • doesn’t immediately spill the publishing date
    • implementation just uses Page.Date().Unix()
  • /:unixhex ditto, but with hexadecimal representation, e.g. /68d6a87e
    • looks a bit more ID-like
  • /:unixhashed ditto, but with a salt, e.g. /f2ca396e
    • for the privacy-conscious microblogger who doesn’t want to reveal the exact times (e.g. only after 8pm) they publish
    • technically a pepper, I’d suggest introducing a new global configuration parameter datepepper. need to be careful with this value since changing it will scramble all permalinks.
    • implementation is roughly sha256("<pepper>\0<date.unix>")[0:8]