Change title of meta transactions page in docs sidebar

pull/2548/head
Francisco Giordano 4 years ago
parent 742c436d28
commit 773c7265e8
  1. 10
      scripts/gen-nav.js

@ -12,12 +12,20 @@ const files = proc.execFileSync(
console.log('.API'); console.log('.API');
function getPageTitle (directory) {
if (directory === 'metatx') {
return 'Meta Transactions';
} else {
return startCase(directory);
}
}
const links = files.map((file) => { const links = files.map((file) => {
const doc = file.replace(baseDir, ''); const doc = file.replace(baseDir, '');
const title = path.parse(file).name; const title = path.parse(file).name;
return { return {
xref: `* xref:${doc}[${startCase(title)}]`, xref: `* xref:${doc}[${getPageTitle(title)}]`,
title, title,
}; };
}); });

Loading…
Cancel
Save