Package.json

The package.json file is a set of meta data about a theme.

package.json 文件是一组关于主题的元数据。

Overview概述

The package.json file is a required file and sets some information about your theme. Edit this file and keep it up to date with the relevant information about your publication's theme.

To reference a working example of a package.json file, review the Casper file, and for further information about specific details of package.json handling, read the npm docs.

package.json文件是一个必需的文件,它设置了一些关于主题的信息。编辑此文件并使其与您的出版物的主题相关信息保持最新。

以引用包package.json文件的工作示例,查看Casper文件,了解包的详细信息。json处理,阅读npm docs

Example

package.json
{
"name": "your-theme-name",
"description": "A brief explanation of your theme",
"version": "0.5.0",
"engines": {
"ghost-api": "v3"
},
"license": "MIT",
"author": {
"email": "your@email.here"
},
"config": {
"posts_per_page": 10,
"image_sizes": {}
}
}

The data in the file must be valid JSON, including double quotes around all property names. Every property except the last one should be separated by a comma.

文件中的数据必须是有效的JSON,包括所有属性名周围的双引号。除了最后一个属性外,所有属性之间都应该用逗号分隔

Additional properties额外的属性

Here are some of the most common optional properties that can be used in the package.json file:

下面是可以在包中使用的一些最常见的可选属性package.json 文件: