Skip to content

Commit cafcfc4

Browse files
TheAlexLichterpi0
authored andcommittedMar 8, 2018
feat(meta): add author property (#41)
1 parent 6481d2b commit cafcfc4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

Diff for: ‎docs/modules/meta.md

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Please read this resources before you enable `mobileAppIOS` option:
4747
- Default: *npm_package_name*
4848
- Meta: `title`
4949

50+
**author**
51+
- Default: *npm_package_author_name*
52+
- Meta: `author`
53+
5054
**description**
5155
- Default: *npm_package_description*
5256
- Meta: `description`

Diff for: ‎packages/meta/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function generateMeta (_options) {
1919
// Defaults
2020
const defaults = {
2121
name: process.env.npm_package_name,
22+
author: process.env.npm_package_author_name,
2223
description: process.env.npm_package_description,
2324
charset: 'utf-8',
2425
viewport: undefined,
@@ -103,6 +104,11 @@ function generateMeta (_options) {
103104
this.options.head.meta.push({ hid: 'apple-mobile-web-app-title', name: 'apple-mobile-web-app-title', content: title })
104105
}
105106

107+
// Author
108+
if (options.author && !find(this.options.head.meta, 'name', 'author')) {
109+
this.options.head.meta.push({ hid: 'author', name: 'author', content: options.author })
110+
}
111+
106112
// description meta
107113
if (options.description && !find(this.options.head.meta, 'name', 'description')) {
108114
this.options.head.meta.push({ hid: 'description', name: 'description', content: options.description })

0 commit comments

Comments
 (0)
Please sign in to comment.