Closed homerhanumat closed 3 years ago
Here is an example, built directly from the theme's example site:
I am facing a similar issue. When I deploy the site via Github Pages, I lose the CSS formatting and I see a distorted webpage. I am not sure though if this error is specific to this theme or is prevalent across all Hugo themes
Hey, as indicated in the issue #14 , you should have a look at Hugo's documentation for hosting on Github pages. @homerhanumat Your website doesn't seem to be built correctly. Don't hesitate to post your solution here as there are a few people looking for the answer.
I did follow the Hugo documentation you reference, for project pages.
I have re-worked the repo https://github.com/homerhanumat/test-pweb so that the docs folder is built straight from the theme's exampleSite
with a custom hugo
command, without any moving of files or editing of config.toml. The README details how to reproduce such a site.
There is no longer a CSS problem (I think in my original test I did not correctly handle the resources
folder) but the other issues remain. In particular:
For issue (1), setting the href to "{{ .Site.Home }}"
rather than "/"
in sidebar.html
should work all the time.
For issue (2) I'm uncertain how to proceed. The generated URL for the portfolio image on the home page is "/portfolio/sample-project/sample.jpg", which by the structure of the docs
folder should work. But in fact "/test-pweb/portfolio/sample-project/sample.jpg" is what works. (Edit the link in the web inspector to verify.)
It might be possible to resolve issues by working entirely with relative URLs, but that would require many revisions, i think.
If I find a quick solutiuons to (2) I will work up a pull request. Thanks for creating this nice theme!
I plan to host my site on my GiHub project page via the
docs
folder. Thus for the GitHub repositoryproject
the base URL is set inconfig.toml
to "https://username.github.io/project/" andpublishDir
is set to "docs".But in deployment I lose CSS and images. For example, the compiled URL for an image turns out to be:
instead of