Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(path): correct handle URI schemes in joinSegments
In Head component, joinSegments is used to build a socialUrl with (`https://${baseUrl}`, slug), which causes a slash to be lost in the result. For example, joinSegments("https://quartz.jzhao.xyz", "layout") will return "https:/quartz.jzhao.xyz/layout". The result is then used in og:url and twitter:url in <head><meta>. This fix tries to preserve each segment, but removes all leading and trailing slashes. In addition, for the first segment, the leading slash is only de-duplicated, not fully trimmed.
- Loading branch information