chore: adding a comment on inferTitle function about translation

pull/14/head
giraud florent 5 years ago
parent 9d8bebb906
commit d7622dd23e

@ -30,7 +30,8 @@
"build": "rm -rf dist && tsc -p src", "build": "rm -rf dist && tsc -p src",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"prepublishOnly": "yarn build && yarn changelog", "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": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"

@ -83,6 +83,8 @@ function injectPageData(tags: string[], data: PageData) {
} }
const inferTitle = (frontmatter: any, content: string) => { 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) { if (frontmatter.home) {
return 'Home' return 'Home'
} }

Loading…
Cancel
Save