Skip to content

Commit

Permalink
Change title of meta transactions page in docs sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Mar 1, 2021
1 parent 742c436 commit 773c726
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/gen-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ const files = proc.execFileSync(

console.log('.API');

function getPageTitle (directory) {
if (directory === 'metatx') {
return 'Meta Transactions';
} else {
return startCase(directory);
}
}

const links = files.map((file) => {
const doc = file.replace(baseDir, '');
const title = path.parse(file).name;

return {
xref: `* xref:${doc}[${startCase(title)}]`,
xref: `* xref:${doc}[${getPageTitle(title)}]`,
title,
};
});
Expand Down

0 comments on commit 773c726

Please sign in to comment.