Content/post/ renders, but content/posts/ 404s


Based on it seems like I should be able to add files to arbitrary directories without too much issue, but it isn’t working.

I have content/post/ and content/posts/

The contents of both are

title: "Test_posts"
slug: "test"
date: 2020-01-25T09:07:55-08:00

Does this work

running hugo server --verbose and then going to

http://localhost:1313/blog/posts/test/ -> 404
http://localhost:1313/blog/post/test/ -> renders fine

Pretty weird! My config.toml:

baseURL = ""
languageCode = "en-us"
title = "thedch"
theme = "hugo-theme-pixyll"

contentdir = "content"
publishdir = "public"
canonifyurls = true

On an unrelated note, I’ve also read the docs to figure out how to change the date format inside a – I’d rather be able to specify date: "Jan 1 2020" instead of 2020-01-01 – I thought this would be a simple switch in the config.toml, but I’m not seeing anything. Let me know if I’ve missed it!

UPDATE: Switching to theme = "ananke" solves the first problem. Looks like the pixyll theme has issues.

Still would love an answer on my date question!

What have you tried so far? Help us help you :slight_smile:

Well, I’ve tried date: "Dec 21 2019" in my posts, but then the date shows up as Jan 1 0001.

I read but that didn’t give me any clues. If anything, it made me a bit more confused:

date = ["date", "publishDate", "lastmod"]

what does this really mean? It seems like the date = bit is setting .Date (what’s .Date? No links or further description found). Okay, let’s assume that’s the under-the-hood jargon for setting the publish date for a set of content. Wait, what’s this?

publishDate = ["publishDate", "date"]

So there’s date which sets .Date (?), and then there’s publishDate which sets(?) … .PublishDate? What’s the difference?

And then there’s the list of strings, ["date", "publishDate", "lastmod"]. What is this doing? I assume this is some sort of lookup – first try "date", then "publishDate"… but what does that mean? Where’s the explanation of what these parameters actually do? There’s a bit of explanation for :fileModTime / :filename / :git, but beyond that, I don’t see anything.

Looking at the whole snippet:

date = ["date", "publishDate", "lastmod"]
lastmod = [":git", "lastmod", "date", "publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]

Why are these so weirdly self referential? date = ["date" ... etc. What does that do? They’re also almost the same, "date", "publishDate" are all in the top 3.

It’s also weird that date can maybe be set by lastmod (I assume this means last modified? Not sure why it needs to be shortened?), but a bunch of my files are showing a post date of Jan 1 0001. If the post date can fall back to lastmod, then you’d think a date of Jan 1 0001 would never show up. Obviously I’m not fully understanding what’s going on.

Is there some documentation introduction I’ve missed where this is all explained? I’ve been poking around in my spare time for the better part of a month (admittedly, I don’t have a lot of spare time) – but I figured this would be pretty plug n play. The documentation looks expansive when scrolling around, but when I actually try to figure stuff out, I fall flat.

Don’t mean to rant here – writing documentation is really hard because it’s pretty inherently written by people who already know the system, and if you know the system, it’s hard to remember what’s obvious and what’s not. I appreciate the amount of documentation that’s been written already – just still a bit confused.

So I think I see your issue. You’re reading the date config (lookup order) docs. What you really want is likely the date formatting docs.