Local static website not rendered as expected. (Netlify deploy and local build&serve work well)
shamiek opened this issue · comments
Describe the bug
Deployment on netlify and using hugo server
(building and serving the site locally) work as expected. However, locally generating the static website to a public
directory does not work as expected. There is no styling, no responsive clicks. There is just a plain html webpage when I open public/index.html
To Reproduce
Steps to reproduce the behavior:
- hugo new site my-site -f=yaml
cd themes
git clone https://github.com/gurusabarish/hugo-profile.git
cd ..
- Copy
config.yaml
from here and createmy-site/config.yaml
hugo --destination public
- Open
my-site/public/index.html
in a browser (I tried firefox and chrome)
Expected behavior
You should see a website exactly as how hugo server
serves at localhost:1313
.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Ubuntu 18.04 LTS
- Browser: Firefox (111.0.1 (64-bit)), Chrome (Version 112.0.5615.49 (Official Build) (64-bit))
Additional context
Netifly deployment and local build and serve work perfectly fine.
Hey i also had this problem while deploying with GitHub actions.
Try this line in config.yaml, Just below where you set theme.
canonifyURLs: true
Hope this helps.
See this #69
Thanks a lot. Adding canonifyURLs: true
worked.