Question on workflow on adding new posts and include date in post

Hello all,

So I have taken my first steps with Hugo. I must say it is impressive, even if it is a bit daunting still.

After a few hours of tinkering I still can’t understand the following. I apologize profoundly if I am missing something obvious, but if anyone could shed some light on this I would be most grateful.

I have been using the “anatole” theme which has most of the features I want.

Here are my questions:

  1. I understand how to add new posts. What I am not sure I have understood correctly is how the workflow for adding posts is supposed to be. Is it:
  • create the post (hugo new posts/a-good-title.md)
  • edit the file in an editor, possibly while running “hugo server -D” to see it change “live”
  • When happy, change the “draft = true” to “draft = false”
  • run hugo (without arguments) to create the public directory
  • publish that public directory to a webroot somewhere
  1. I don’t know if this is a “anatole”-theme specific thing, but in the demo-page for anatole, each post has the date and “One minute read” (or similar) on top. In my installation I have neither. I’d really like to have both. By god have I tried to understand how to get that there like on the demo-page, but I can’t seem to find it anywhere.

All in all, Hugo seems really nice. A bit daunting still, but I hope I can get the hang of it soon.

Thanks,

//James

Not sure your first point is a question, but you’re correctly described the Hugo workflow. For the reading time you can find it on the single layout, perhaps you need to have the right file on the i18n folder. If you want more help please share your (source) code.

Hello again!

Thank you so much for your reply!

In themes/anatole/i18n there are a bunch of files, like en.toml, fi.toml etc. The one called “en.toml” has:

[reading_time]
one = "One-minute read"
other = "{{ .Count }}-minute read"

…in it. I guess somehow I need to get this sourced, maybe by defining my site as being in english?

I think the theme is expecting “post” (singular), unless you have configured it to look for “posts” (plural).

1 Like

Wow, thanks! I am not at the computer right now so I can’t try, but I will definitely try this as soon as I get a chance.

Thanks again!

Hi @jmooring … sorry for late reply. (life got in the way). Just wanted to let anyone who comes across this that your suggestion did the trick. Thank you again :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.