MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / buildUrl

Function buildUrl

apps/web/utilities/seo/utils/buildThreadUrl.ts:4–17  ·  view source on GitHub ↗
(
  isSubDomainRouting: boolean,
  settings: Settings,
  thread: SerializedThread
)

Source from the content-addressed store, hash-verified

2import { LINEN_URL } from 'config';
3
4export function buildUrl(
5 isSubDomainRouting: boolean,
6 settings: Settings,
7 thread: SerializedThread
8) {
9 let url = isSubDomainRouting
10 ? `https://${settings.redirectDomain}/t/${thread.incrementId}`
11 : `${LINEN_URL}/${settings.prefix}/${settings.communityName}/t/${thread.incrementId}`;
12
13 if (thread.slug) {
14 url += '/' + thread.slug.toLowerCase();
15 }
16 return url;
17}

Callers 2

buildThreadSeoFunction · 0.90
buildStructureDataFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected