You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Apache or Nginx to serve a static site having pretty URLs, the default is to serve directories as directories and thus have a trailing slash (with redirect enforcement in place). This seems to be how many other static generators do it as well, e.g. Jekyll.
The issue I'm running into is that when the site is published, the links generated by getUrl() for anchor links and for <link rel="canonical"> in my theme are effectively redirects. This makes the site slower due to additional redirects, and can also make machine metadata harder to correlate due to URLs that are strictly speaking not identical.
I've tried a number of different things. For example:
I need it served with a trailing slash as the intention is to preserve and match the URL structures of other sites part of the project. This would also avoid infinite redirects or vendor lock-in when e.g. migrating to another engine in the future.
When using Apache or Nginx to serve a static site having pretty URLs, the default is to serve directories as directories and thus have a trailing slash (with redirect enforcement in place). This seems to be how many other static generators do it as well, e.g. Jekyll.
The issue I'm running into is that when the site is published, the links generated by
getUrl()
for anchor links and for<link rel="canonical">
in my theme are effectively redirects. This makes the site slower due to additional redirects, and can also make machine metadata harder to correlate due to URLs that are strictly speaking not identical.I've tried a number of different things. For example:
However, the slash seems to be hardcoded and stripped away at the end regardless.
I'm willing to submit a patch if it is a welcomed addition. Let me know roughly what approach you'd like me to take in that case.
Related issues: #170
The text was updated successfully, but these errors were encountered: