MCPcopy Create free account
hub / github.com/github/docs / getHomepage

Method getHomepage

lib/page.js:293–295  ·  view source on GitHub ↗
(requestPath)

Source from the content-addressed store, hash-verified

291 // /en/articles/foo -> /en
292 // /en/enterprise/2.14/user/articles/foo -> /en/enterprise/2.14/user
293 static getHomepage(requestPath) {
294 return requestPath.replace(/\/articles.*/, '')
295 }
296
297 // given a page path, return an array of objects containing hrefs
298 // for that page in all languages

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected