Hugo-coder: Date inside post page

Created on 24 Oct 2019  路  5Comments  路  Source: luizdepra/hugo-coder

I am seeing an awkward behavior in single post pages.

There is a meta here that holds post metadata (date and reading time).

My site is using hugo-coder but I am not seeing these details on the page.

Example:
https://www.maugzoide.com/post/it-is-hard-to-be-a-better-human/

Post file:
https://raw.githubusercontent.com/mauricioabreu/blog/master/content/post/it-is-hard-to-be-a-better-human.md

Config file:
https://github.com/mauricioabreu/blog/blob/master/config.toml

Hugo version:
Hugo Static Site Generator v0.59.0/extended darwin/amd64 BuildDate: unknown

Most helpful comment

Posts files should be placed in posts directory, not post.
Note the 's'.

blog/master/content/post
should be renamed to
blog/master/content/posts

All 5 comments

Also, tags are not visible.
Since that HTML is static, what could be causing it?
I installed hugo using a submodule and it looks up-to-date.

Posts files should be placed in posts directory, not post.
Note the 's'.

blog/master/content/post
should be renamed to
blog/master/content/posts

@josephting thank you so much! I don't know why it was post. I have this blog for years (changed theme days ago).

It's possible that your previous theme was using post instead.
It depends on the theme.

You can also specify type in your front matter of your content without renaming your directory.
Sometimes, it's better that the url don't get changed.

Adding this line to your metadata will tell hugo to use posts template from hugo-coder for this particular content.

type: posts

If this is not defined, hugo will figure it out with the folder name.

@josephting thank you! I did not know about the front matter and the type.
Already changed it here and it worked like a charm!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swarnalee picture swarnalee  路  4Comments

SillyPilleus picture SillyPilleus  路  5Comments

rajeev1986 picture rajeev1986  路  7Comments

maxdrohde picture maxdrohde  路  3Comments

jtr109 picture jtr109  路  5Comments