Change title of meta transactions page in docs sidebar
(cherry picked from commit 773c7265e8)
This commit is contained in:
committed by
Hadrien Croubois
parent
566c601d41
commit
5acedf5027
@ -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,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user