Last active
December 25, 2015 22:39
-
-
Save xdumaine/7051050 to your computer and use it in GitHub Desktop.
Added routes for server.js to support old wordpress permalinks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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