Hugo does not build content unless there is a change

Dear Folks,

This question has been asked before here but the question has been archived without a resolution.

Whenever I run hugo server, I find that existing pages like those under the blogs directory, do not get built and do not appear on the website, unless I make a change to them.

As soon as I make a change they start appearing, but if I were to stop the server and run the server again they stop appearing unless I make a change to file under blogs.

This issue has been driving me crazy.

I have setup a minimal site here.

Follow steps below to reproduce the problem:

  1. Clone the code and run hugo server under the root of the repository
    2, Observer that the blogs under blogs menu item does not show up in the navigation menu.
  2. Then make a change to the file under blogs like adding a line and hugo will add the blogs menu item.
  3. Shut down the server and restart it and blogs menu item will disappear again.

I hope someone is able to reproduce this issue and give me a resolution.
Many thanks,

Do you use any pre-processor?

The content files should have the extension .md

Hi @ju52,

No, I am not using a preprocessor.

I am using Pandoc which is a valid format according to this link. This is why the extension is .pdc.

I also tried changing the extension to .md but that did not have any effect.

I believe there is something else involved.

I am thinking it might have to do with page bundles or content organization but this is only a guess as I am quite new to hugo.

I don’t know what the issue is, but I have the problem you have when I clone that repo. When I move the blog post as a markdown into another site, it works fine. I don’t use pandoc in this context, so I’m unsure if that has to do with it.

Good luck! :slight_smile:

@maiki Thank you for your reply. After further research I found that changing index.pdc to _index.pdc sort solved the problem and the blogs turned up. Would you be able to tell the directory structure of your content directory. I think a lot has to do with how the directories are structured and how the files are named.

I am now facing the problem of making my landing page not the page featuring all my blogs but a welcome message.

Many thanks,

Oh yeah, that sounds right. At it says:

The homepage, similar to other list pages in Hugo, accepts content and front matter from an file. This file should live at the root of your content folder (i.e., content/ ). You can then add body copy and metadata to your homepage the way you would any other content file.

I always put content in content/ I actually missed that in your content, as I copied the blog section over to a different project.

Since the content is building as expected, what issue are you having regarding content showing on the front page? I haven’t used that theme, but I’d double check the instructions to ensure the theme is working as expected.