0

I am redoing a wordpress blog in keystone.js and need to setup archives. I need to replace 2012 with some sort of generic number detection to show the archive page. Not the greatest solution but will work for this project. I would just prefix the url with /archives/ but the blog is established as /year/month in the url.

    // Views
app.get('/', routes.views.blog);
app.get('/category/:category?', routes.views.blog);
app.get('/:post', routes.views.post);
 app.get('/2012/:month', routes.views.blog);
app.get('/pages/gallery', routes.views.gallery);
  app.all('/pages/about', routes.views.about);
app.all('/pages/contact', routes.views.contact);
user1572796
  • 1,057
  • 2
  • 21
  • 46

1 Answers1

0

I created blog archives for keystonejs.

https://github.com/cmillsLA/keystone-archives

user1572796
  • 1,057
  • 2
  • 21
  • 46