In custom.js
, it is possible to:
- get today’s date with
var today = new Date()
- format the date into the name of the page
- Depending on the complexity, may need something as ugly as DateTimeFormat:
var pageName = Intl.DateTimeFormat(locale, options).format(today)
- Simple formats are much easier.
- Depending on the complexity, may need something as ugly as DateTimeFormat:
- navigate to the page with
window.location.href = '#/page/' + pageName
- if the name contains special characters, encode it with
encodeURIComponent(pageName)
- failing to provide a valid name may mess the application
- if the name contains special characters, encode it with