-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
SITEURL should be without protocol (no http://) #1532
Comments
The relevant line in my settings file is:
So I don't see the problem. Perhaps you can be more explicit? |
I think what @22decembre means is that some people prefer to use HTTPS if available and by setting However, it can be worked around by having two pelicanconf.py files for both protocols and generate a site for each. Another possible solution is to use So I don't think this is bug, but we could resolve this issue by adding a FAQ entry listing these two approaches to the problem. |
In no particular order:
|
While your argument about no reason to prefer HTTP over HTTPS is a valid one, I've encountered situations where e.g. the server's certificate was expired or wrong and I had to switch to HTTP. Switching between the protocols certainly are edge cases. The workarounds I describe above suffice IMHO, I don't really see how a static generator can create protocol agnostic absolute links anyways. Wouldn't you say @22decembre ? |
on my website, I have a cacert cert, thus I want to allow people to come and choose whether they use http or https. In that case, it makes sense : Cacert is not known everywhere (I don't know if my parents, who are common visitors of my blog, know Cacert or if they have it in their browser). To address that particular problem, I customized my current template to show a logo saying «I use cacert, you can visit with https». This is available in the pelican-theme github now, and in use there : On relative_links… I don't know. Maybe the solution indeed. In any matter this option should be better explained. |
and relative_url is marked for dev' purpose. Right ? Will it work on a full website ? |
Do you utilize Atom/RSS feeds? If not, you can probably get away with not specifying SITEURL at all, which should essentially give you what you want. |
I use rss yes. I believe it's not the solution. Why not making everything available with just 'www.site.url' ? |
Most standards (feeds do IIRC) require a fully qualified URL, including the the protocol. |
ok, so indeed a bit hard to make it agnostic yes... No idea or solution. |
What happens if you set
In my testing, that behaves as expected. |
@justinmayer : it seems to work ! Maybe it should be better explained in the doc and/or recommanded ! |
For what it's worth, this is a well-established, universal convention. For more information, refer to: http://www.paulirish.com/2010/the-protocol-relative-url/ |
yet, it's only the second time I hear about it ! (the first time being a buggy blog, hence aking it a bit less accurate ... :-s ) |
I just figure out that rss aggregators does not like the setup... :-S |
can we close this? |
@ingwinlu: Yes. Thanks for the reminder. |
By using http:// in SITEURL, the page are generated with http hard-link, which does not let the user switch to https protocol (if wanted).
The page can be loaded in https, but all links, referals, pictures... are in http.
The text was updated successfully, but these errors were encountered: