(pathname: string)
| 11 | |
| 12 | /** The post page itself: one segment, no sub-route, no `.md` suffix. */ |
| 13 | export 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 | }; |
no outgoing calls
no test coverage detected