You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to generate per-{year, month, day} archivesΒ #448
One thing that I'll lose as a result of this migration is an archive of posts (like this one). I don't really care all that much, and I'll most likely replace it with a list of all posts, with a different layout, generated from layouts/section/post.html. I'd like to ask you, however, to consider adding a capability for hugo to generate time-based archives. Such archives would most likely be useful to people who want to preserve their existing archive pages.
It'd generate content under public/<section>/2014/index.html for example, from layouts/post/list.html. It'd need to allow per-section and per-level (yearly, monthly, daily) control. It'd also need to play well with permalinks parameter from config.yaml - I don't really have a good idea how to address that.
Is such feature request a sensible one? :)
Reacted by Thibaud Lepretre, Alex Pakhunov, Marius Gedminas, DobrosΕaw Ε»ybort, Aria Fallah, Marc Climent, Peter Piotr Kilczuk, Kaushal Modi, Mike-E, Frances Coronel and 21 more
An idea for implementation: Generate one index.html file for every level of date-related data present in permalinks from the config file. For example, with:
permalinks:
post: /:year/:month/:slug
generate
/2014/index.html from layouts/section/post.html with .Pages containing all 2014 posts;
/2014/01/index.html from layouts/section/post.html with .Pages containing all January 2014 posts.
etc.
This should require minimal new logic needed. Some sanity checking might be required,Β unless we want to allow things like /:month/:year. If you point me to the relevant bit of code where content/* β list of pages to be generated is devised, I might give it a try :)
This assumes the year/month structure that Jekyll and others use.
I would prefer instead to register every directory and maintain a list of children content regardless of if it's using the permalinks structure or not.
This would not only give us what you need, but also support for subsections.
It does make sense - the only question in this kind of schema is how do we decide whether or not render an index.html page? A user may simply not want a file there. Should it be generated by default, or should it be generated only if user asks for an index on given level?
I think by default. It doesn't hurt to have it and you don't need to link
to it. Plus all directories should have an index on the web if they have
content.
It does make sense - the only question in this kind of schema is how do we
decide whether or not render an index.html page? A user may simply not
want a file there. Should it be generated by default, or should it be
generated only if user asks for an index on given level?
β
Reply to this email directly or view it on GitHub #448 (comment).
Any updates on this? What are the current plans to get archives (without workarounds)?
Especially as #6992 was closed with reference to this issue here.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
The content-adapter module linked above already provides year/month/day archive pages, with a preliminary hugo list published step. That seems worth treating as the baseline rather than introducing a parallel archive implementation.
Is generating these archives directly from existing site pages, without that preliminary step, still the intended remaining scope of this proposal? Content adapters currently cannot access built page collections, so removing the step appears to require a lifecycle/API decision.
Before proposing code, could we clarify whether the preferred direction is a template-driven mechanism along the lines discussed earlier, or documenting the module-based approach? I would keep date-based previous/next navigation (#6992) separate from the initial scope.
@bep given the content-adapter solutions shared here, do you see a remaining core feature worth pursuing in this proposal, or would documenting the adapter-based approach be the more useful contribution? I'd like to clarify the intended scope before proposing code.
Activity
yacoob commentedon Sep 3, 2014
An idea for implementation: Generate one index.html file for every level of date-related data present in
permalinksfrom the config file. For example, with:generate
/2014/index.htmlfromlayouts/section/post.htmlwith.Pagescontaining all 2014posts;/2014/01/index.htmlfromlayouts/section/post.htmlwith.Pagescontaining all January 2014posts.This should require minimal new logic needed. Some sanity checking might be required,Β unless we want to allow things like
/:month/:year. If you point me to the relevant bit of code wherecontent/*βlist of pages to be generatedis devised, I might give it a try :)spf13 commentedon Sep 3, 2014
I actually think this should be a bit different.
This assumes the year/month structure that Jekyll and others use.
I would prefer instead to register every directory and maintain a list of children content regardless of if it's using the permalinks structure or not.
This would not only give us what you need, but also support for subsections.
Does that make sense?
yacoob commentedon Sep 4, 2014
It does make sense - the only question in this kind of schema is how do we decide whether or not render an
index.htmlpage? A user may simply not want a file there. Should it be generated by default, or should it be generated only if user asks for an index on given level?spf13 commentedon Sep 4, 2014
I think by default. It doesn't hurt to have it and you don't need to link
to it. Plus all directories should have an index on the web if they have
content.
On Wednesday, September 3, 2014, Jakub Turski notifications@github.com
wrote:
Steve Francia
http://stevefrancia.com
http://spf13.com
http://twitter.com/spf13
spf13 commentedon Oct 19, 2014
I think this is related or the same as #465. Tying them together.
216 remaining items
raoulb commentedon Oct 3, 2024
Any updates on this? What are the current plans to get archives (without workarounds)?
Especially as #6992 was closed with reference to this issue here.
github-actions commentedon Sep 2, 2026
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the
masterbranch, please reply with all of the information you have about it in order to keep the issue open.If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
xndvaz commentedon Oct 13, 2026
The content-adapter module linked above already provides year/month/day archive pages, with a preliminary
hugo list publishedstep. That seems worth treating as the baseline rather than introducing a parallel archive implementation.Is generating these archives directly from existing site pages, without that preliminary step, still the intended remaining scope of this proposal? Content adapters currently cannot access built page collections, so removing the step appears to require a lifecycle/API decision.
Before proposing code, could we clarify whether the preferred direction is a template-driven mechanism along the lines discussed earlier, or documenting the module-based approach? I would keep date-based previous/next navigation (#6992) separate from the initial scope.
jamietanna commentedon Oct 28, 2026
I've used the Content Adapter to create date-based pagination pages for my Hugo website ( https://gitlab.com/tanna.dev/jvt.me + https://gitlab.com/jamietanna/www.jvt.me-theme) and it works really nicely, so we do at least have a way to do this as of recent Hugo versions
xndvaz commentedon Nov 6, 2026
@bep given the content-adapter solutions shared here, do you see a remaining core feature worth pursuing in this proposal, or would documenting the adapter-based approach be the more useful contribution? I'd like to clarify the intended scope before proposing code.