MCPcopy Index your code
hub / github.com/github/docs / getNewTitle

Function getNewTitle

lib/render-content/plugins/rewrite-local-links.js:75–81  ·  view source on GitHub ↗
(href, context)

Source from the content-addressed store, hash-verified

73}
74
75async function getNewTitle(href, context) {
76 const page = findPage(href, context.pages, context.redirects)
77 if (!page) {
78 throw new Error(`Unable to find Page by href '${href}'`)
79 }
80 return await page.renderProp('title', context, { textOnly: true })
81}
82
83function getNewHref(node, languageCode, version) {
84 const { href } = node.properties

Callers 1

getNewTitleSetterFunction · 0.85

Calls 2

renderPropMethod · 0.80
findPageFunction · 0.50

Tested by

no test coverage detected