feat: Generate page titles from navModel

This commit is contained in:
Johannes Schill
2019-01-16 15:59:05 +01:00
parent 25304629bd
commit feeb3ea56d
5 changed files with 15 additions and 10 deletions

View File

@ -41,3 +41,7 @@ export function getNavModel(navIndex: NavIndex, id: string, fallback?: NavModel)
return getNotFoundModel();
}
export const getTitleFromNavModel = (navModel: NavModel) => {
return `${navModel.main.text}${navModel.node.text ? ': ' + navModel.node.text : '' }`;
};