themefisher / airspace-hugo

Airspace Hugo theme for multipurpose use, like Portfolio, Blog, Business.
https://gethugothemes.com/products/airspace/?utm_source=airspace_github&utm_medium=referral&utm_campaign=github_theme_about
MIT License
354 stars 509 forks source link

header navigation menu rel links issues with github pages #157

Closed vce-open closed 3 years ago

vce-open commented 3 years ago

we plan to buy a domain so i am not sure if i have configured my config.toml wrong or is it real issue

used github actions and github pages to deploy and host website on https://<org11>.github.io/<reponame>/ in top navigation menu pages are redirected to /<reponame>/<reponame>/page when the correct behaviour should be /<reponame>/page.

salim-b commented 3 years ago

Did you set the proper baseURL in config.toml?

vce-open commented 3 years ago

hi i tried different versions to crosscheck, correct me if i am wrong is this proper https://<org11>.github.io/<reponame>/ for base url.

i think few other hugo projects with same link syntax before hosting it on own domains.

salim-b commented 3 years ago

is this proper https://<org11>.github.io/<reponame>/ for base url.

nope.

without reponame, just https://<org11>.github.io would be correct.

vce-open commented 3 years ago

that would be good if <reponame> is same as <org_name> or <github-username> as per github pages offical docs, i have multiple hugo repos.

And also if we have that as base url footer menu gives issues and pages get loading issues as images will exist in reponame/images but not `/images' while deploying using gh-pages . I did verify that for just in case before raising request.

salim-b commented 3 years ago

Have you actually tried setting baseURL = "https://<org11>.github.io"?

I have no experience with GitHub Pages. Generally, if you wanna host multiple Hugo sites under the same (sub)domain, you have to put each site's static files into a separate subfolder and set baseURL to that subfolder. With GitHub Pages project sites it seems to be a slightly different story: My guess is that GitHub's HTTP server prepends https://<org11>.github.io/<reponame>/ to all relative URLs of a project site. Now documentation says they don't even support any static file generator other than Jekyll – i.e. you have to build the site locally. This basically means there won't be a satisfying solution unless you gonna switch to using a GitHub Pages organization/user site, because:

The only proper solution I guess would be to set baseURL = "https://<org11>.github.io/<reponame>/" and copy the generated static files into a folder named <reponame> in the <org11>.github.io repository (the GitHub Pages organization site repo). That should work as expected.

vce-open commented 3 years ago

i did try "Have you actually tried setting baseURL = "https://.github.io"?" will attach a video or gif of that behavior in a day or two.

is this a recent change on Hugo side "Hugo will prepend //" i am doing this for the college. All my personal hugo repos have custom domains and I either did not get this error or forgot if this happened to them, as i had the domain before hand.

can you mean time see this hugo issue on github.

Thanks salim

salim-b commented 3 years ago

is this a recent change on Hugo side (...)

No, I guess this problem only occurs when using GitHub Pages project sites in combination with a theme that uses relative URLs (like Airspace does).

can you mean time see this hugo issue on github.

The issue you mention has been fixed long time ago.