No re-rendering on document changes

Hi there,

using hugo-extended": "^0.125.2" it’s currently not possible for me to get a page re-rendered when adoc documents are modified. It seems --watch detects the changes and also browser live reload is working, but the actual page content is not re-rendered. Also tried it with --disableFastRender. With markdown files everything works as expected.

Any suggestions?

Operating system? I am unable to reproduce the problem running hugo server with v0.125.3 on Ubuntu 22.04.

git clone --single-branch -b hugo-forum-topic-49465 hugo-forum-topic-49465
cd hugo-forum-topic-49465
hugo server

Then edit any page…

MacOS Sonoma. Will try your example.

Can you reproduce the problem using the minimal example I created?

Your minimal example works. So it’s not an OS issue. Maybe i need to test with hugo CLI directly. Not with the npm-wrapper hugo-extended. I’m using the docsy-example (GitHub - google/docsy-example: An example documentation site using the Docsy Hugo theme) as base setup. Maybe it’s also due to my extended setup with Docsy, Hugo modules and AsciiDoctor Diagram integration.

If you are able to reproduce the problem using the CLI, you might look through these known issues related to hugo server:

Most are not applicable to what you describe.

I was able to reproduce it when using Hugo modules. Hugo CLI was the same result as hugo-extended. So basically it seems to be related to Hugo modules itself. Maybe just when having module mounts into the content directory. And maybe just when also having AsciiDoc content inside a module to be rendered. Will check that now.

Does the module provide content or templates?
Is the module remote or vendored?
Can you provide an example?
Is this is a known issue?

Module is not vendored so far. It’s a remote module, but for faster local development cloned locally and locally linked using a replace directive (Use Hugo Modules | Hugo)

Just so I understand, you modify content in the replaced module and that is when you see the problem. Please confirm.

No. I just have a module which contains additional content for the generated site. This is imported locally via a replace directive.

The adoc content i modify is in the main/root project (Hugo site).

But it seems to be related to having a module mounted into the content folder. Couldn’t test until now. Will also test if changes in the mounted module will also not be re-rendered.

Please share your config. The objective here is to create a minimal example to consistently reproduce the problem.

Here is a config for reproduction.

It seems that it’s even not related to Hugo modules. But it related to nested content structures. When applying changes on the same nesting level, everything seems to work. But when trying to edit adoc files of an higher nesting level afterwards, the changes won’t trigger a re-rendering.

E.g. add some text to content/_index.adoc and afterwards try to add. some text to content/about/index.adoc. Here the first change leads to a re-rendering, but the second change does not. Doing it the other way round (with a freshly started hugo server) both changes are applied. But again, changes to nested adoc documents below nesting level of content/_index.adoc are not re-rendered.

OK, I can reproduce this with both Markdown and AsciiDoc content. This is not specific to AsciiDoc content.

git clone --single-branch -b hugo-forum-topic-49465 hugo-forum-topic-49465
cd hugo-forum-topic-49465
hugo server

Open your browser to http://localhost:1313/about/.

Then in a new console:

echo "foo" >> content/
echo "bar" >> content/about/

Expected: content/about/ changes in browser.

Actual: content/about/ does not change in browser.

This works as expected with v0.122.0, but fails with v0.123.0 and later.


Alright. Not good, but at least this can be fixed and avoided in the future via a regression test. And as it also affects Markdown, it’s maybe get’s more attention.

Do you want to file a bug ticket or should i do?

EDIT: I’ve seen you already filed a ticket: Page does not reload after modifying a different page · Issue #12436 · gohugoio/hugo · GitHub

See the last line of my previous reply.

1 Like

Yah, didn’t saw it :see_no_evil: Currently a bit woozy due to medicine.

1 Like

Also, there are several (somewhat) related issues included in this list:

So hugo server is by no means perfect, but it is much better with v0.123.0 and later, despite a few regressions that have mostly been fixed.

Note that I haven’t retested many of these recently, so some may already be fixed.

In the interest of tracking forum topics related to v0.123.x that do not have a corresponding GitHub issue, I am marking this resolved.

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