Skip to content

Instantly share code, notes, and snippets.

@xdumaine
Last active December 25, 2015 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xdumaine/7051050 to your computer and use it in GitHub Desktop.
Save xdumaine/7051050 to your computer and use it in GitHub Desktop.
Added routes for server.js to support old wordpress permalinks
for(var year = 2000; year < 2050; year++) {
for(var month = 1; month < 13; month++) {
for(var day = 1; day < 32; day++) {
server.get('/' + year + '/' + (month < 10 ? '0' : '') + month + '/' + (day < 10 ? '0' : '') + day + '/:slug/', frontend.single);
}
server.get('/' + year + '/' + (month < 10 ? '0' : '') + month + '/:slug/', frontend.single);
}
server.get('/' + year + '/:slug/', frontend.single);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment