MCPcopy Create free account
hub / github.com/dailydotdev/apps / isPostPermalinkPath

Function isPostPermalinkPath

packages/webapp/lib/postRoutes.ts:13–20  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

11
12/** The post page itself: one segment, no sub-route, no `.md` suffix. */
13export const isPostPermalinkPath = (pathname: string): boolean => {
14 const match = /^\/posts\/([^/?#]+)$/.exec(pathname);
15 return (
16 !!match &&
17 !match[1].endsWith('.md') &&
18 !RESERVED_POST_SLUGS.includes(match[1])
19 );
20};

Callers 2

getLayoutVariantResponseFunction · 0.90
postRoutes.spec.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected