Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate year, month and day-based links #7

Open
ndarilek opened this issue Feb 6, 2014 · 1 comment
Open

Generate year, month and day-based links #7

ndarilek opened this issue Feb 6, 2014 · 1 comment
Labels
enhancement Improvement or suggestion

Comments

@ndarilek
Copy link

ndarilek commented Feb 6, 2014

One feature I'm missing in Docpad is generation of links like so:

  • /2009: All posts in 2009
  • /2009/07: July 2009
  • /2009/07/01: Posts on July 1

I'm attempting to add this in my config by hooking into events, but I'm not immediately sure of the Docpad way of doing this.

What might be nice are dayView, monthView and yearView configuration options that return a document template for each year, month and day. Maybe the current plugin can add documents to date-based arrays which these templates have access to, to avoid having to perform another findLive. I'm sure it isn't hard to implement, I'm just not sure what the most efficient way is, and it makes sense as part of the current dateurls plugin I'd think. It might also make sense to have a next/previous day/month/year helper for linking to the previous/next period of time with posts.

Thanks!

@markgrovs
Copy link
Contributor

Thanks for the suggestion. It may make sense to build a new extension for this functionality. I'll consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement or suggestion
Projects
None yet
Development

No branches or pull requests

2 participants