hugo-coder
hugo-coder copied to clipboard
Content is not displayed
Error handling response: TypeError: Cannot read properties of null (reading 'codescript') at chrome-extension://iamhhblhmpldjchjecmapgoikpjmmfoe/content/content.js:4:18 site.webmanifest:1 Failed to load resource: the server responded with a status of 404 (Not Found) site.webmanifest:1 Manifest: Line: 1, column: 5, Unexpected data after root element. site.webmanifest:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Hey, @fabiogeraci.
Could you please provide us more information about the issue?
But, this line at chrome-extension://iamhhblhmpldjchjecmapgoikpjmmfoe/content/content.js:4:18 tells me that one of your browser extension is causing the issue. Try again on a private tab or disabling all extensions.
Hey, thank you for the quick response. I tried, as you suggested on a private tab as well as on firefox with no extensions and the outcome is the same
Failed to load resource: the server responded with a status of 404 (Not Found)
I am not actually sure that the issue is the theme I tried a different theme and it was not rendering correctly the examplesite
Which version of Hugo are you using?
Well, try running make demo and then access http://localhost:1313.
It should display something like this:
% make demo
hugo server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0
Start building sites …
hugo v0.102.3-b76146b129d7caa52417f8e914fc5b9271bf56fc+extended linux/amd64 BuildDate=2022-09-01T10:16:19Z VendorInfo=gohugoio
WARN 2022/11/03 15:22:29 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/home/luizdepra/dev/personal/web/hugo-coder/exampleSite/content/posts/rich-content.md:26:1"
WARN 2022/11/03 15:22:30 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/home/luizdepra/dev/personal/web/hugo-coder/exampleSite/content/posts/rich-content.pt-br.md:26:1"
| EN | PT-BR
-------------------+----+--------
Pages | 57 | 51
Paginator pages | 0 | 0
Non-page files | 0 | 0
Static files | 10 | 10
Processed images | 0 | 0
Aliases | 23 | 19
Sitemaps | 2 | 1
Cleaned | 0 | 0
Built in 1414 ms
Watching for changes in /home/luizdepra/dev/personal/web/hugo-coder/{archetypes,assets,exampleSite,i18n,layouts,static}
Watching for config changes in exampleSite/config.toml, /home/luizdepra/dev/personal/web/hugo-coder/config.toml
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 0.0.0.0)
(You might have problems to use the make command if you are using Window.)
@luizdepra reappear process is as follows:
-
step 1:
git clone https://github.com/luizdepra/hugo-coder
git logd336b3cc3a65adafb5bcc436806fe22ce4117e94 -
step 2:
cd hugo-coder; hugo server -D --themesDir=../.. --source=exampleSite --bind 0.0.0.0 -
show error:
GET http://localhost:1313/site.webmanifest 404 (Not Found) site.webmanifest:1 Manifest: Line: 1, column: 1, Syntax error. -
hugo version
hugo v0.111.3+extended darwin/amd64 BuildDate=unknown
@luochenxi where this error appears? In the browser console or on the commandline output?
I don't remember adding the site.webmanifest file into Hugo-Coder. Is this something custom?
@luizdepra In the browser console. I did not make any changes, but simply reproduced the steps above.

open http://localhost:1313/
In the browser console :

@luochenxi, right. I tried reproducing the issue and I didn't get the error.
Try accessing the page with other browsers or using the incognito mode. It looks like an extension or something is trying to access the file.
As far as I know, the site.webmanifest is a file used to provide information from a PWA to the browser. See here. So, doesn't make sense to Hugo Coder have it.
So, doesn't make sense to Hugo Coder have it.
You reference the site.webmanifest here. Since it does not make sense for Hugo Coder to have it, should you remove that line from custom-icons.html in layouts?
There are a few lines in this file that make assumptions about existing content. Some kind of settings should be checked before enabling these lines, else 404 errors are thrown in the browser console.