Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages not linking back to home page #17

Open
gloriasilveira opened this issue Apr 12, 2015 · 5 comments
Open

Pages not linking back to home page #17

gloriasilveira opened this issue Apr 12, 2015 · 5 comments

Comments

@gloriasilveira
Copy link

Thanks for a great theme! One little snag, though...

When I am on a Page in the site, and I click the site title, site logo image or the "Index" link in "Index:Archives", instead of taking me back to the home page, it takes me to a "Directory listing for /pages/" and lists the three pages I have on the site.

However, if I am on an article page, I can click on the site title, site logo image or the "Index" link in "Index: Archives", and it'll take me back to the home page, as I'd expect.

I am not getting this problem when I switch back to the default theme Pelican ships with. How can I fix this? I really like this theme, but don't want my site visitors to get lost.

@gfidente
Copy link
Owner

hi Gloria, thanks for reporting this

the links you mention are all defined from the base.html template so it seems you might just miss the SITEURL setting in your pelicanconf / publishconf file

For example, for my blog, that is:
SITEURL = 'http://giuliofidente.com'

you have to replace giuliofidente.com with your site url, can you check if you have that set properlty?

@gloriasilveira
Copy link
Author

You know, I had tried putting in a SITEURL, but it was breaking the stylesheet (ie no styles would show up when I'd add either the domain name as SITEURL or http://localhost:8000) so I had been leaving that blank.

After reading your suggestion, I added in the domain name as SITEURL again, and this time, when it broke the stylesheet, I just went ahead and uploaded to my production server anyways.

I'm not sure why, but after doing that, now the stylesheet works with a SITEURL, even locally. And yes, the original linking issue I reported is fixed now-thanks for your suggestion, and for a great theme!

@gfidente
Copy link
Owner

gfidente commented May 6, 2015

The issue you are seeing when SITEURL is unset seems valid to me, the themes rely on SITEURL being set at all times.

To make the themes to work both when testing locally and when your site is published on its final URL, you need to have SITEURL set to two different values: http://localhost:8000/ when testing locally and http://yourdomain.com/ when publishing.

Pelican makes this possible by using two different config files to be consumed when using "make devserver" (local testing) or "make publish" (publishing); you can set it to localhost:8000 in pelicanconf.py (which is consumed by make devserver) and set it instead to yourdomain.com in publishconf.py (which is consumed by make publish)

The publishconf.py imports all the settings from pelicanconf.py , so you only need to put in publishconf.py the settings you want to be overridden when publishing (like SITEURL).

@gfidente
Copy link
Owner

hi, do you think we could close this?

@ansufw
Copy link

ansufw commented Mar 20, 2021

@gfidente Hi, thanks for your answer. I had same problem and it was solved !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants