Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/thatdeveloperguy-website / src/engines/seo/urls/canonical.ts |
| Date | Not specified in source |
| Repository | Janady13/thatdeveloperguy-website |
| Revision | 2bea2ebdff0e34494bff597d4fa9c8422a0c3a94 |
| Branch | main |
| Path or archive member | src/engines/seo/urls/canonical.ts |
| Original SHA-256 | 6fe88ab2e7e4dc4c2a6cd398912e1cc91f89dff4105563f3a68d9d1924202217 |
| Git blob SHA | a596269903e14f9b09144cb56bf71b3cd506e65b |
| Reading-copy SHA-256 | 6fe88ab2e7e4dc4c2a6cd398912e1cc91f89dff4105563f3a68d9d1924202217 |
Recovered source transcript
Download complete source text ↓7 lines · 0.3 KB
import { PRODUCTION_ORIGIN } from './production-origin.ts';
import { normalizePath } from './normalize-path.ts';
export function canonicalUrl(path: string): string {
const normalized = normalizePath(path);
return normalized === '/' ? `${PRODUCTION_ORIGIN}/` : `${PRODUCTION_ORIGIN}${normalized}`;
}