From d7622dd23e8d7e5a37306b5d4a50be0dc1720a66 Mon Sep 17 00:00:00 2001 From: giraud florent Date: Thu, 14 May 2020 06:18:32 -0400 Subject: [PATCH] chore: adding a comment on inferTitle function about translation --- package.json | 3 ++- src/markdownToVue.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a992e163..66e4ca31 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build": "rm -rf dist && tsc -p src", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "prepublishOnly": "yarn build && yarn changelog", - "doc": "bin/vitepress.js dev documentation" + "doc:dev": "bin/vitepress.js dev documentation", + "doc:build": "bin/vitepress.js build documentation" }, "engines": { "node": ">=10.0.0" diff --git a/src/markdownToVue.ts b/src/markdownToVue.ts index 007f0cc1..65b17b91 100644 --- a/src/markdownToVue.ts +++ b/src/markdownToVue.ts @@ -83,6 +83,8 @@ function injectPageData(tags: string[], data: PageData) { } const inferTitle = (frontmatter: any, content: string) => { + // TODO is it worth it to have this if you want to add translation later ? + // by default it will take the first h1 as title if (frontmatter.home) { return 'Home' }