examples/homepage/src/documentationPages.js
function rerouteLinks (html) {
  return html.replace(/href="(\.\/[a-z0-9\-]+\.md)"/g, (all, key) => {
    const found = documentationPages.filter((page) => page.key === key)[0]
    if (!found) return all
    /* global __legendary_pancake_base_pathname__ */
    const base = __legendary_pancake_base_pathname__ // eslint-disable-line camelcase
    const pathname = found.pathname
    return `href="${base}${pathname}" data-to="${pathname}"`
  })
}
function rerouteLinks (html) {
  return html.replace(/href="(\.\/[a-z0-9\-]+\.md)"/g, (all, key) => {
    const found = documentationPages.filter((page) => page.key === key)[0]
    if (!found) return all
    /* global __legendary_pancake_base_pathname__ */
    const base = __legendary_pancake_base_pathname__ // eslint-disable-line camelcase
    const pathname = found.pathname
    return `href="${base}${pathname}" data-to="${pathname}"`
  })
}
function rerouteLinks ( html ) { return html . replace ( / href="(\.\/[a-z0-9\-]+\.md)" / g , ( all , key ) => { const found = documentationPages . filter ( ( page ) => page . key === key ) [ 0 ] if ( ! found ) return all /* global __legendary_pancake_base_pathname__ */ const base = __legendary_pancake_base_pathname__ // eslint-disable-line camelcase const pathname = found . pathname return ` ${ base } ${ pathname } ${ pathname } ` } ) }
Rewrite links to direct to the correct page.
Rewrite links to direct to the correct page .