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

Need for greater flexibility of URL handling in templates #804

Open
phish108 opened this issue Jan 28, 2019 · 0 comments
Open

Need for greater flexibility of URL handling in templates #804

phish108 opened this issue Jan 28, 2019 · 0 comments
Assignees

Comments

@phish108
Copy link

Most URL templates allow only relative (to the current page) or absolute (protocol, host etc.) links.

It would be nicer if template designers have more control over the generated URLs without touching the odd translate functions.

Instead, it would be nice to allow protocol-relative and host-relative paths in all URLs passed to the templates.

  • protocol-relative URLs make it easy to run http and https version of the same site without modification of the rendered HTML. Instead of publishing links as http://example.com/xx/yyyy/index.html, the link would be just //example.com/xx/yyyy/index.html. When switching protocols, the entire site remains functional without the need of maintaining the a separate site.

  • host-relative URLs start with omit the host part of the URL and start with the site root. This is extremely helpful if running the same site under the different URLs (e.g., www.example.com and example.com). Host-relative URLs would transform http://example.com/xx/yyyy/index.html into /xx/yyyy/index.html. This makes stylesheets and javascript links much nicer and shorter.

This is part of separating the features of #710

@ghost ghost assigned yuji Feb 1, 2019
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

2 participants