~/Blog/blog-data master ❯ hugo server 15:47:21
Watching for changes in /Users/Den/Blog/blog-data/{archetypes,assets,content,data,static,themes}
Watching for config changes in /Users/Den/Blog/blog-data/config.toml, /Users/Den/Blog/blog-data/go.mod
Start building sites …
hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d+extended darwin/arm64 BuildDate=2023-08-31T11:23:51Z VendorInfo=brew
WARN Current environment is "development". The "comment system", "CDN" and "fingerprint" will be disabled.
| EN | ES | DE | RU | SK
-------------------+-----+-----+-----+-----+------
Pages | 133 | 136 | 135 | 138 | 133
Paginator pages | 3 | 3 | 3 | 3 | 3
Non-page files | 0 | 0 | 0 | 0 | 0
Static files | 218 | 218 | 218 | 218 | 218
Processed images | 0 | 0 | 0 | 0 | 0
Aliases | 52 | 53 | 53 | 54 | 52
Sitemaps | 2 | 1 | 1 | 1 | 1
Cleaned | 0 | 0 | 0 | 0 | 0
Built in 793 ms
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
When I go to localhost then summary page shows correctly and displays all posts. All links look correctly. But clicking on any link, i.e. to open any post, gives ‘Page Not Found’.
Where would you start looking to find a possible cause?
PS. I didn’t change anything in the config. Updated the post today and wanted to see how it looks like on the localhost, but got this error ‘Page Not Found’. Didn’t pay much attention, thought it might be related to me working under VPN are alike. Then uploaded updated site and this was my mistake. Now site doesn’t work too. Will appreciate any ideas where to look for possible cause. Thanks.
Thank you for your prompt reply. I know about this requirement and want to avoid it. That’s why I am not asking to find potential bug for me, but share the ideas on where to look for it… If that is not possible, well, I’ll continue with google-fu…
The links may look correctly, but obviously they arent working. So it’s some faulty condition in the way those links are generated. You have to dig into your templates to find that location.
Most often handling of languages (if it is a multi lang setup) and/or handling/configuration of the BaseURL are the culprit.
If you are using a theme, you could reach out to the theme maintainer to get help.
Ok, I’ve sorta fixed the error and blog works again.
@Arif, you were correct - the bug was in this file. I’ve replaced it with an old copy from backup and everything works now. Will look for specific line with the bug.
Off topic, but related to your site (https://denshub.com ), you have a weird glitch that causes every page to blink to light background before it goes back to the dark one. It is happening on macOS Safari, with dark mode enabled.
@Fastidious, thanks for letting me know! It’s because I had to use old template from backup to restore blog at least temporarily… Now, when I found the bug, everything will be back to normal. Once again, your attention and desire to help is much appreciated!
All right… I found the bug It’s a shame (to me), but the whole problem was in the following. I have put some stupid comment into single.html file right in the beginning, like so:
<!-- Here is some stupid comment in this format -->
{{- define "title" -}}
{{ .Title }} - Den's Hub
{{- end -}}
And because of this comment not in {{- /* this format */ -}}, all links didn’t work.
Anyway, I learned something new today, and will adjust my workflow to test more thoroughly before deploying to the server.
Thanks again to everyone who helped and supported me here - very much appreciated!