Tazeg/hugo-blog-jeffprod

Archives 404 error

ncoleman opened this issue · 2 comments

Clicking the "2020" link under the Archives section produces a 404 error. Under public/archives, there is an index.html, an index.xml and a 2020 directory with no content. The "2020" link is to the /archives/2020 directory.

Tazeg commented

Here are the files created in public/ :

public/
├── 2020
│   └── my-first-post
│       └── index.html
├── 404.html
├── archives
│   ├── 2020
│   │   ├── index.html
│   │   └── index.xml
│   ├── index.html
│   └── index.xml
├── css
│   └── blog.css
├── img
│   └── bg-blog.jpg
├── index.html
├── index.xml
├── page
│   └── 1
│       └── index.html
├── post
│   ├── index.html
│   └── index.xml
├── sitemap.xml
└── tags
    ├── index.html
    └── index.xml

10 directories, 16 files

I did all steps described in the README. I'm sorry I don't get 404 error. I use Hugo Static Site Generator v0.72.0.

My fault, sorry. I assumed it was picking up the archive date from the "date" field in the front matter. But reading it more carefully, you need to add a field "archive = "2020"". I didn't have this field in my posts front matter.

It would be a nice feature though, to pick up the archive field from the date field. I don't know how much work that would be though.

Thanks.